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

На главную


avatar.GetVendorList()

Возвращает список Id вещей на продажу у NPC-торговца (исключая товары вторичного рынка).

Должна быть вызвана после avatar.RequestVendor().

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

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

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

-- возвращаемые значения
objects: table of VendorItem - список описаний объектов на продажу:
  id: ObjectId - Id объекта
  quantity: number( int ) - количество предметов, имеющихся у торговца. Если -1, то количество не ограничено.
  counter: number( int )- значение итемого счётчика (заряды), -1 означает, что счётчик отсутствует
  isBound: boolean - прибинтенность итема
  isSecondhand: boolean (здесь всегда false) - товар с вторичного рынка
  price: number( int )- цена одного предмета в основной внутриигровой валюте
  requiredUnlocks: table of UnlockId or nil - требуемые анлоки для покупки, индексация с 1
  requiredAchievements: table or nil - требуемые очки событий для покупки, индексация с 1, каждый элемент таблица с полями
    ruleId: RuleId - идентификатор события
    achievement: number (integer) - требуемое количество очков события
  alternativePrices: table или nil - nil если нет информации; иначе список (индексируется от 0) цен в альтернативных валютах, элемент списка - таблица с полями:
    currencyId: CurrencyId - идентификатор альтернативной валюты (получение информации об альтернативной валюте по CurrencyId - см. avatar.GetCurrencyInfo(currencyId))
    value: number (integer) - цена в этой альтернативной валюте

-- пример
local list = avatar.GetVendorList()
for i = 0, GetTableSize( list ) - 1 do
  local itemId = list[i].id
  local object = avatar.GetItemInfo( itemId )
  local name = object.name
end

см. avatar.GetSecondhandList

Search: "CategoryLuaApi" "CategoryInteraction"

EnumLearnError
EnumVendor
EventInteractionStarted
EventItemsExchangeDeclineIgnored
EventItemsExchangeError
EventItemsExchangeFinished
EventItemsExchangeInvited
EventItemsExchangeOfferFinalConfirmedChanged
EventItemsExchangeOfferItemsChanged
EventItemsExchangeOfferMoneyChanged
EventItemsExchangeOfferPrimaryConfirmedChanged
EventItemsExchangeSlotIsBusy
EventItemsExchangeStarted
EventItemsExchangeStateChanged
EventTalkStarted
EventTalkStopped
EventTrainerLearnError
EventVendorBuyNotEnoughPlace
EventVendorBuyReputationIsTooSmall
EventVendorBuyRequiredAchievement
EventVendorItemAlreadySold
EventVendorItemNotForSale
EventVendorListUpdated
FunctionAvatarBuy
FunctionAvatarBuyToSlot
FunctionAvatarGetInteractorCue
FunctionAvatarGetInteractorCurrentLocations
FunctionAvatarGetInteractorInfo
FunctionAvatarGetInteractorNextCues
FunctionAvatarGetInteractorTeleportLocations
FunctionAvatarGetInterlocutor
FunctionAvatarGetSecondhandList
FunctionAvatarGetTeleportLocationInfo
FunctionAvatarGetTeleportLocations
FunctionAvatarGetVendorBuyback
FunctionAvatarGetVendorList
FunctionAvatarHasInteractorCue
FunctionAvatarHasInteractorQuest
FunctionAvatarIsInteractorRootCue
FunctionAvatarIsInteractorTrainer
FunctionAvatarIsInteractorVendor
FunctionAvatarIsTalking
FunctionAvatarIsTeleportLocationValid
FunctionAvatarRequestInteractions
FunctionAvatarRequestVendor
FunctionAvatarReturnToStartCue
FunctionAvatarSelectInteractorCue
FunctionAvatarStartInteract
FunctionAvatarStopInteract
FunctionAvatarTeleportToLocation
FunctionInteractionCancelExchange
FunctionInteractionGetExchangeInvited
FunctionInteractionGetExchangeInviter
FunctionInteractionGetExchangeSlotCount
FunctionInteractionHasExchange
FunctionInteractionInviteToExchange
FunctionInteractionIsAvatarExchangeInviter
FunctionInteractionIsExchangeInInvitation
FunctionInteractionIsExchangeInProgress
FunctionInteractionRemoveExchangeItem
FunctionObjectGetInteractorInfo
FunctionObjectHasMobVisual
FunctionObjectHasQuest
FunctionObjectHasWorldSecret
FunctionObjectIsVendor
FunctionUnitGetTrainerClass
FunctionUnitIsTrainer
ItemsExchangeState


CategoryLuaApi CategoryFunction CategoryInteraction CategoryAvatar

На главную