Skip to content

Commit

Permalink
fix add custom item recent version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonny-jeahyunchoi committed Mar 12, 2024
1 parent f8a6795 commit e5af4d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Lib9c/Action/CombinationEquipment5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ public static Skill GetSkill(EquipmentItemOptionSheet.Row row, SkillSheet skillS
var skillRow = skillSheet.OrderedList.First(r => r.Id == row.SkillId);
var dmg = random.Next(row.SkillDamageMin, row.SkillDamageMax + 1);
var chance = random.Next(row.SkillChanceMin, row.SkillChanceMax + 1);
var skill = SkillFactory.GetV1(skillRow, dmg, chance);

var hasStatDamageRatio = row.StatDamageRatioMin != default && row.StatDamageRatioMax != default;
var statDamageRatio = hasStatDamageRatio ?
random.Next(row.StatDamageRatioMin, row.StatDamageRatioMax + 1) : default;
var refStatType = hasStatDamageRatio ? row.ReferencedStatType : StatType.NONE;

var skill = SkillFactory.Get(skillRow, dmg, chance, statDamageRatio, refStatType);
return skill;
}
catch (InvalidOperationException)
Expand Down
2 changes: 1 addition & 1 deletion Lib9c/TableCSV/Item/EquipmentItemOptionSheet.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2070,4 +2070,4 @@ id,stat_type,stat_min,stat_max,skill_id,skill_damage_min,skill_damage_max,skill_
1055400122,HIT,1,1,,,,,,,,
1055400123,DEF,1,1,,,,,,,,
1055400124,,,,700010,50,80,28,28,,,
1055400125,,,,700011,,,28,28,2300,2300,
1055400125,,,,700011,0,0,28,28,2300,2300,HP

0 comments on commit e5af4d8

Please sign in to comment.