Пользовательские дополнения
На главную
common.EnablePersonalEvent( sysEventName, object )
Включает обработку персонального события для конкретной пары (событие : объект). Применимо только к некоторым специальным событиям:
Данные события формируются клиентом только для тех объектов, для которых хотя-бы один аддон включил персональное событие на конкретную пару (событие : объект)
ВНИМАНИЕ! Ручное управление персональными событиями может привести к неожиданным эффектам. Допускается только в хорошо протестированном коде в целях оптимизации для случаев с высокой степенью покрытия события фильтрами. Например если аддон отслеживает бафы на всех объектах вокруг, то можно зарегистрировать EVENT_OBJECT_BUFF_ADDED без фильтров, через данную функцию добавить все соответствующие объекты и иметь единую точку входа.
ВНИМАНИЕ! Таблица персональных событий является глобальной (общей для всего интерфейса) и при регистрации события из списка выше без фильтров оно может приходить для объектов которые данный аддон не активировал (но активировал кто-то другой).
ВНИМАНИЕ! На один аддон для одной пары (событие : объект) счетчик персональных событий должен находиться в диапазоне 0-5, глобально 0-250.
Для данной функции есть обратный метод common.DisablePersonalEvent().
-- библиотека:
common
-- объявление:
function EnablePersonalEvent( sysEventName, object )
-- параметры:
sysEventName: string - название события
object: ObjectId (int) - идентификатор объекта для которого включается персональное событие
-- возвращаемые значения:
нет
-- примеры:
common.EnablePersonalEvent( "EVENT_OBJECT_BUFF_ADDED", avatar.GetId() ) -- Включить отправку EVENT_OBJECT_BUFF_ADDED для аватара
Search: "CategoryLuaApi" "CategoryCommon"
CategoryCommon
EnumAddonState
EnumGoalState
EventAddonLoadStateChanged
EventAllodsGoalAdded
EventAllodsGoalChanged
EventAllodsGoalCompleted
EventFullscreenChanged
EventLocaleChanged
EventPosConverterChanged
EventUserScreenshot
FunctionApitype
FunctionCommonCreateValuedObject
FunctionCommonCreateValuedText
FunctionCommonDisablePersonalEvent
FunctionCommonEnablePersonalEvent
FunctionCommonEnableUIRender
FunctionCommonFormatFloat
FunctionCommonFormatInt
FunctionCommonFormatNumber
FunctionCommonGetAbsTimeMs
FunctionCommonGetAddonInfo
FunctionCommonGetAddonMainForm
FunctionCommonGetAddonName
FunctionCommonGetAddonSysName
FunctionCommonGetAllodsGoals
FunctionCommonGetAllodsGoalsOnLoadingScreen
FunctionCommonGetApiType
FunctionCommonGetApiVersion
FunctionCommonGetClientArch
FunctionCommonGetCredits
FunctionCommonGetCSSList
FunctionCommonGetDateTimeFromMs
FunctionCommonGetEmptyWstring
FunctionCommonGetFatalityPhraseLimits
FunctionCommonGetFirstPaymentBonusInfo
FunctionCommonGetFPSData
FunctionCommonGetLocalDateTime
FunctionCommonGetLocalDateTimeMs
FunctionCommonGetLocale
FunctionCommonGetLocaleList
FunctionCommonGetLocalization
FunctionCommonGetMks
FunctionCommonGetMsFromDateTime
FunctionCommonGetPosConverterParams
FunctionCommonGetRandFloat
FunctionCommonGetRandInt
FunctionCommonGetScriptCfgVar
FunctionCommonGetSetBonusInfo
FunctionCommonGetShortString
FunctionCommonGetSpecialStatInfo
FunctionCommonGetStateManagedAddons
FunctionCommonGetStateName
FunctionCommonGetTerritoryInfo
FunctionCommonGetTextureInfo
FunctionCommonGetTextureSize
FunctionCommonHitFrameHandler
FunctionCommonIsAvatarNameValid
FunctionCommonIsCapsLockEnabled
FunctionCommonIsEmptyValuedText
FunctionCommonIsEmptyWstring
FunctionCommonIsEqualStats
FunctionCommonIsFatalityPhraseFiltered
FunctionCommonIsKeyEnabled
FunctionCommonIsOnPayToPlayShard
FunctionCommonIsSoundEnabled
FunctionCommonIsSubstring
FunctionCommonIsSubstringEx
FunctionCommonIsTextFiltered
FunctionCommonIsUIRenderEnabled
FunctionCommonIsValidText
FunctionCommonIsValuedObject
FunctionCommonIsValuedText
FunctionCommonIsWidget
FunctionCommonIsWString
FunctionCommonLogError
FunctionCommonLogInfo
FunctionCommonLogWarning
FunctionCommonMakeUserScreenshot
FunctionCommonOnEvent
FunctionCommonOnFrame
FunctionCommonOnReaction
FunctionCommonQuitGame
FunctionCommonRegisterEventHandler
FunctionCommonRegisterFrameHandler
FunctionCommonRegisterReactionHandler
FunctionCommonSendEvent
FunctionCommonSendUserModsEvent
FunctionCommonSetCursor
FunctionCommonSetIconFlash
FunctionCommonSetLocale
FunctionCommonStateLoadManagedAddon
FunctionCommonStateReloadManagedAddon
FunctionCommonStateUnloadManagedAddon
FunctionCommonUnRegisterEvent
FunctionCommonUnRegisterEventHandler
FunctionCommonUnRegisterFrameHandler
FunctionCommonUnRegisterReaction
FunctionCommonUnRegisterReactionHandler
FunctionCompareWString
FunctionCompareWStringEx
FunctionEscapeWString
FunctionGlobal
FunctionIsIndexableUdata
GoalId
CategoryLuaApi
CategoryFunction
CategoryCommon
На главную