diff --git a/Docs/API.md b/Docs/API.md index 51e95cc9b..d4c16d3ee 100644 --- a/Docs/API.md +++ b/Docs/API.md @@ -598,11 +598,11 @@ If the `level` argument is not `nil`, the table will contain level-scaled values The behavior of getting a table entry is identical to that of `StatGetAttribute` and setting a table entry is identical to `StatSetAttribute`. -The `StatSetAttribute` example rewritten using `GetStat`: +The `StatSetAttribute` example rewritten using `GetStats`: ```lua -- Swap DamageType from Poison to Air on all skills for i,name in pairs(Ext.Stats.GetAllStats("SkillData")) do - local stat = Ext.Stats.GetStat(name) + local stat = Ext.Stats.GetStats(name) if stat.DamageType == "Poison" then stat.DamageType = "Air" end @@ -614,7 +614,7 @@ end Stat attributes can be retrieved by reading the appropriate property of the StatEntry object: ```lua -local spell = Ext.Stats.GetStat("Shout_FlameBlade", "SpellData") +local spell = Ext.Stats.GetStats("Shout_FlameBlade", "SpellData") local useCosts = spell.UseCosts ``` @@ -628,7 +628,7 @@ The list of attributes each stat type supports can be found in `Public\Shared\St Stat attributes can be updated using simple table assignment: ```lua -local spell = Ext.Stats.GetStat("Shout_FlameBlade", "SpellData") +local spell = Ext.Stats.GetStats("Shout_FlameBlade", "SpellData") spell.UseCosts = "BonusActionPoint:1;SpellSlot:1:1:2" ``` @@ -666,7 +666,7 @@ The `AttributeFlags`, `SpellFlagList`, `WeaponFlags`, `ResistanceFlags`, `Passiv Reading flags: ```lua -local spell = Ext.Stats.GetStat("Shout_ArmorOfAgathys", "SpellData") +local spell = Ext.Stats.GetStats("Shout_ArmorOfAgathys", "SpellData") _D(spell.SpellFlags) -- Prints: -- ["HasSomaticComponent", "HasVerbalComponent", "IsSpell"] @@ -674,7 +674,7 @@ _D(spell.SpellFlags) Writing flags: ```lua -local spell = Ext.Stats.GetStat("Shout_ArmorOfAgathys", "SpellData") +local spell = Ext.Stats.GetStats("Shout_ArmorOfAgathys", "SpellData") spell.SpellFlags = {"HasVerbalComponent", "IsSpell"} ```