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

На главную


lifestyle.GetSlots()

Возвращает типы слотов DRESS_SLOT_... одежды в слотах пресета стиля.

-- библиотека:
lifestyle

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

-- параметры:
нет

-- возвращаемые значения:
table of number (enum DRESS_SLOT_...) - типы слотов одежды в слотах пресета стиля, индексированных с 0


-- пример:
local slots = lifestyle.GetSlots()
local preset = lifestyle.GetPreset( lifestyle.GetActivePreset() )
for i = 0, GetTableSize( slots ) - 2 do
  local itemId = preset[ i ]
  if itemId then
    LogInfo( "слот ", slots[ i ], ": есть предмет" )
  else
    LogInfo( "слот ", slots[ i ], ": нет предмета" )
  end
end

Связанные страницы: "CategoryLuaApi" "CategoryLifestyle"

CategoryLifestyle
EventEquipmentLifestyleChanged
FunctionLifestyleCanChangePreset
FunctionLifestyleGetActivePreset
FunctionLifestyleGetPreset
FunctionLifestyleGetPresetsCount
FunctionLifestyleGetSlots
FunctionLifestyleSetActivePreset


CategoryLuaApi CategoryFunction CategoryLifestyle

На главную