Skip to content
Open
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
12 changes: 6 additions & 6 deletions Docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Expand All @@ -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"
```

Expand Down Expand Up @@ -666,15 +666,15 @@ 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"]
```

Writing flags:
```lua
local spell = Ext.Stats.GetStat("Shout_ArmorOfAgathys", "SpellData")
local spell = Ext.Stats.GetStats("Shout_ArmorOfAgathys", "SpellData")
spell.SpellFlags = {"HasVerbalComponent", "IsSpell"}
```

Expand Down