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

На главную


avatar.GetLearnAbilityConditions( abilityId )

Возвращает информацию, можно ли выучить умение у NPC-учителя, и коды ошибок, если нельзя.

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

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

-- параметры
abilityId: AbilityId - Id ресурса умения для обучения

-- возвращаемые значения
table - таблица с полями:
  canLearn: boolean - true, если можно выучить, false - если нельзя. Во втором случае код можно посмотреть в failedConditions.
  failedConditions: table of number (enum LEARN_ERROR_...) - индексированный с 0 список ошибок.

-- пример
local canLearnInfo = avatar.GetLearnAbilityConditions( abilityId )
if not canLearnInfo.canLearn do
  local errors = canLearnInfo.failedConditions
end

Search: "CategoryLuaApi" "CategoryInteraction"

EnumLearnError
EnumVendor
EventInteractionStarted
EventItemsExchangeCanceled
EventItemsExchangeCompleted
EventItemsExchangeDeclineIgnored
EventItemsExchangeError
EventItemsExchangeInvited
EventItemsExchangeOfferFinalConfirmedChanged
EventItemsExchangeOfferItemsChanged
EventItemsExchangeOfferMoneyChanged
EventItemsExchangeOfferPrimaryConfirmedChanged
EventItemsExchangeSlotIsBusy
EventItemsExchangeStarted
EventItemsExchangeStateChanged
EventKnownTeleportLocationUpdated
EventTalkStarted
EventTalkStopped
EventTrainerLearnError
EventTrainerListUpdated
EventTrainerNotEnoughMoney
EventTrainerNotEnoughRerollTickets
EventTrainerNotEnoughRubyOptions
EventVendorBuyHonorIsTooSmall
EventVendorBuyNotEnoughMoney
EventVendorBuyNotEnoughPlace
EventVendorBuyReputationIsTooSmall
EventVendorItemAlreadySold
EventVendorItemNotForSale
EventVendorListUpdated
FunctionAvatarBuy
FunctionAvatarBuyRuby
FunctionAvatarBuyToSlot
FunctionAvatarCanMarkLocation
FunctionAvatarGetInteractorCue
FunctionAvatarGetInteractorCurrentLocations
FunctionAvatarGetInteractorInfo
FunctionAvatarGetInteractorNextCues
FunctionAvatarGetInteractorTeleportLocations
FunctionAvatarGetInterlocutor
FunctionAvatarGetLearnAbilityConditions
FunctionAvatarGetLearnSpellConditions
FunctionAvatarGetRubyCost
FunctionAvatarGetStatsRerollTicketCount
FunctionAvatarGetTalentRerollTicketCount
FunctionAvatarGetTeleportLocationInfo
FunctionAvatarGetTeleportLocations
FunctionAvatarGetTrainerAbilities
FunctionAvatarGetTrainerSpells
FunctionAvatarGetVendorBuyback
FunctionAvatarGetVendorList
FunctionAvatarHasInteractorCue
FunctionAvatarHasInteractorQuest
FunctionAvatarIsInteractorTrainer
FunctionAvatarIsInteractorVendor
FunctionAvatarIsTalking
FunctionAvatarLearnAbility
FunctionAvatarLearnSpell
FunctionAvatarMarkCurrentLocation
FunctionAvatarRequestInteractions
FunctionAvatarRequestTrainer
FunctionAvatarRequestVendor
FunctionAvatarRerollStats
FunctionAvatarRerollTalents
FunctionAvatarReturnToStartCue
FunctionAvatarSelectInteractorCue
FunctionAvatarSell
FunctionAvatarStartInteract
FunctionAvatarStopInteract
FunctionAvatarTeleportToLocation
FunctionInteractionAcceptInviteToExchange
FunctionInteractionCancelExchange
FunctionInteractionFinalConfirmExchange
FunctionInteractionGetExchangeInvited
FunctionInteractionGetExchangeInviter
FunctionInteractionGetExchangeSlotCount
FunctionInteractionHasExchange
FunctionInteractionInviteToExchange
FunctionInteractionIsAvatarExchangeInviter
FunctionInteractionIsExchangeInInvitation
FunctionInteractionIsExchangeInProgress
FunctionInteractionPlaceExchangeItem
FunctionInteractionPrimaryConfirmExchange
FunctionInteractionRemoveExchangeItem
FunctionInteractionSetExchangeMoney
FunctionObjectGetInteractorInfo
FunctionObjectHasOnlyRepeatableQuests
FunctionObjectHasQuest
FunctionObjectHasWorldSecret
FunctionObjectIsVendor
FunctionUnitGetTrainerClass
FunctionUnitIsTrainer


CategoryLuaApi CategoryFunction CategoryInteraction CategoryAvatar

На главную