Пользовательские дополнения

На главную


avatar.GetAbilityInfo( abilityId )

Возвращает информацию об абилке по идентификатору её ресурса.

-- система:
UIState/GameState
функция имеет основную реализация в логике и расширенную реализацию в UI

-- библиотека
avatar

-- объявление:
function GetAbilityInfo( id )

-- параметры
id: AbilityId - Id ресурса умения

-- возвращаемые значения
nil, если такого умения нет
table, если действие в слоте есть

-- поля возвращаемой таблицы
id: AbilityId - Id умения
name: WString (название)
description: ValuedText or nil - описание с подставленными текущими значениями параметров
level: number( int ) - уровень, начиная с которого можно изучить это умение
rank: number( int ) - ранг умения (начиная с 1)
sysInfo: string - системная информация для дебага (путь к файлу)
hasReplacementSpell: boolean - true если есть подменяющее заклинание
--{ часть таблицы, реализованная только для UI
texture: TextureId - идентификатор текстуры для иконки абилки
--}

-- пример использования
local abilities = avatar.GetAbilities()
local abilityInfo = avatar.GetAbilityInfo( abilities[0] )
if abilityInfo then
  local name = abilityInfo.name
end

Search: "CategoryLuaApi" "CategorySpellbook"

AbilityId
ActionGroupId
EnumSubElement
EventAbilitiesElementAdded
EventDefaultSpellChanged
EventDefaultSpellEffect
EventSpellbookChanged
EventSpellbookElementAdded
EventSpellbookElementChanged
EventSpellbookElementEffect
FunctionAvatarGetAbilities
FunctionAvatarGetAbilityInfo
FunctionAvatarGetAbilityReplacementSpell
FunctionAvatarGetAbilityReplacementSpells
FunctionAvatarGetActionGroupSpells
FunctionAvatarGetActionGroupStatBonus
FunctionAvatarGetSpellBook
FunctionAvatarIsBuffDisease
FunctionAvatarIsBuffMagic
FunctionAvatarIsBuffPoison
FunctionAvatarRunAESpell
FunctionAvatarRunSpell
FunctionItemLibGetActionGroupsInfo
FunctionSpellLibBuffsCanDispel
FunctionSpellLibCanRunAvatar
FunctionSpellLibCanRunAvatarEx
FunctionSpellLibGetActionGroups
FunctionSpellLibGetAESectorProps
FunctionSpellLibGetCooldown
FunctionSpellLibGetCurrentValues
FunctionSpellLibGetDescription
FunctionSpellLibGetDurationBuff
FunctionSpellLibGetGroups
FunctionSpellLibGetGroupsDescriptions
FunctionSpellLibGetIcon
FunctionSpellLibGetObjectSpell
FunctionSpellLibGetProperties
FunctionSpellLibGetRequiredBuffs
FunctionSpellLibGetRequiredResources
FunctionSpellLibGetRequirements
FunctionSpellLibGetState
FunctionSpellLibHasDurationBuff
SpellId


CategoryLuaApi CategoryFunction CategorySpellbook CategoryAvatar

На главную