本文整理汇总了C#中GameData.EligibleForNightmareShift方法的典型用法代码示例。如果您正苦于以下问题:C# GameData.EligibleForNightmareShift方法的具体用法?C# GameData.EligibleForNightmareShift怎么用?C# GameData.EligibleForNightmareShift使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameData
的用法示例。
在下文中一共展示了GameData.EligibleForNightmareShift方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OptimizeCharacter
private void OptimizeCharacter(GameData.DataBuddyInformation character, string stat, bool ignoreRecordMateria, int numberOfEquipment)
{
DataPartyDetails party = FFRKProxy.Instance.GameState.PartyDetails;
int index = -1;
for (int i = 0; i < 5; i++)
{
if (characters[i] != null && characters[i].BuddyId == character.BuddyId)
{
index = i;
break;
}
}
if (index == -1)
{
return;
}
List<uint> equippedWeapons = new List<uint>();
List<uint> equippedArmor = new List<uint>();
List<uint> equippedAccessories = new List<uint>();
List<DataRecordMateriaInformation> equippedRecordMateria = new List<DataRecordMateriaInformation>();
for (int i = 0; i < 5; i++)
{
if (i == index)
{
continue;
}
if (weaponBoxes[i].SelectedItem != null)
{
equippedWeapons.Add(((DataEquipmentInformation)weaponBoxes[i].SelectedItem).InstanceId);
}
if (armorBoxes[i].SelectedItem != null)
{
equippedArmor.Add(((DataEquipmentInformation)armorBoxes[i].SelectedItem).InstanceId);
}
if (accessoryBoxes[i].SelectedItem != null)
{
equippedAccessories.Add(((DataEquipmentInformation)accessoryBoxes[i].SelectedItem).InstanceId);
}
if (recordMateriaBoxes[i].SelectedItem != null)
{
equippedRecordMateria.Add(((DataRecordMateriaInformation)recordMateriaBoxes[i].SelectedItem));
}
}
List<DataEquipmentInformation> atkWeapons = new List<DataEquipmentInformation>();
foreach (DataEquipmentInformation weapon in party.Equipments.Where(equip => equip.Type == GameData.SchemaConstants.ItemType.Weapon && !equippedWeapons.Contains(equip.InstanceId)))
{
if (characters[index].UsableEquipCategories.Contains(weapon.Category))
{
atkWeapons.Add(weapon);
}
}
List<DataEquipmentInformation> atkArmor = new List<DataEquipmentInformation>();
foreach (DataEquipmentInformation armor in party.Equipments.Where(equip => equip.Type == GameData.SchemaConstants.ItemType.Armor && !equippedArmor.Contains(equip.InstanceId)))
{
if (characters[index].UsableEquipCategories.Contains(armor.Category))
{
atkArmor.Add(armor);
}
}
atkWeapons = atkWeapons.OrderByDescending(weapon => weapon.StatWithSynergy(stat,
weapon.SeriesId == RealmSynergy.SeriesId || character.EligibleForNightmareShift(RealmSynergy.NightmareCategory))).ToList();
List<DataEquipmentInformation> possibleWeapons = new List<DataEquipmentInformation>();
foreach (DataEquipmentInformation weapon in atkWeapons)
{
if (FFRKInspector.GameData.EquipmentElementalInformation.ElementalEquipment.ContainsKey(weapon.EquipmentId) ||
possibleWeapons.Count(item => item.Category == weapon.Category) < numberOfEquipment)
{
possibleWeapons.Add(weapon);
}
}
atkArmor = atkArmor.OrderByDescending(armor => armor.StatWithSynergy(stat,
armor.SeriesId == RealmSynergy.SeriesId || character.EligibleForNightmareShift(RealmSynergy.NightmareCategory)))
.ThenByDescending(armor => armor.StatWithSynergy("Res", armor.SeriesId == RealmSynergy.SeriesId
|| character.EligibleForNightmareShift(RealmSynergy.NightmareCategory))
+ armor.StatWithSynergy("Def", armor.SeriesId == RealmSynergy.SeriesId
|| character.EligibleForNightmareShift(RealmSynergy.NightmareCategory)))
.ToList();
List<DataEquipmentInformation> possibleArmor = new List<DataEquipmentInformation>();
foreach (DataEquipmentInformation armor in atkArmor)
{
if (FFRKInspector.GameData.EquipmentElementalInformation.ElementalEquipment.ContainsKey(armor.EquipmentId) ||
possibleArmor.Count(item => item.Category == armor.Category) < numberOfEquipment)
{
possibleArmor.Add(armor);
}
}
DataEquipmentInformation accessory = party.Equipments.Where(equip => equip.Type == GameData.SchemaConstants.ItemType.Accessory
&& !equippedAccessories.Contains(equip.InstanceId))
.OrderByDescending(acc => acc.StatWithSynergy(stat, acc.SeriesId == RealmSynergy.SeriesId
|| character.EligibleForNightmareShift(RealmSynergy.NightmareCategory)))
//.........这里部分代码省略.........