Пользовательские дополнения
На главную
rules.GetEventBySysName( sysName )
Получить id игрового эвента по его sysName (см. поле sysName у rules.GetEventInfo( eventRuleId )).
-- библиотека:
rules
-- объявление:
function GetEventBySysName( sysName )
-- параметры:
sysName: string - нелокализуемый строковый идентификатор
eventRuleId: ObjectId - идентификатор описания правил эвента
-- возвращаемое значение:
ObjectId или nil - если эвент не найден, то nil; иначе идентификатор описания правил эвента
Пример:
local eventRuleId = rules.GetEventBySysName( sysName )
if eventRuleId then
local eventRuleInfo = rules.GetEventInfo( eventRuleId )
if eventRuleInfo then
LogInfo( "Info: ", eventRuleInfo.name )
if eventRuleInfo.types[ RULE_TYPE_ACTION ] then
local rewardMoney = eventRuleInfo.reward.money
end
end
end
См. также
Связанные страницы: "CategoryLuaApi" "CategoryRules"
BillingBonusId
CategoryRules
EnumMsgGetBonusListResultResult
EnumRuleNotificationType
EnumRuleType
EventBillingInfoBonusChanged
EventBillingInfoBonusStatusChanged
EventMissionRuleCounterChanged
EventMissionRulesChanged
EventNewsPostLoaded
EventNewsPostSelected
EventWishmasterChanged
EventWishmasterMultiplying
FunctionRulesBillingInfoGetBonuses
FunctionRulesBillingInfoGetBonusInfo
FunctionRulesBillingInfoUpdate
FunctionRulesGetEventBySysName
FunctionRulesGetEventCounter
FunctionRulesGetEventInfo
FunctionRulesGetEvents
FunctionRulesGetEventTimeIntervals
FunctionRulesGetNotificationInfo
FunctionRulesGetWishmaster
FunctionRulesGetWishmasterMultiplyingInfos
FunctionRulesGetZonesMaps
FunctionRulesWishmasterRollMultiplying
WishmasterResourceId
CategoryLuaApi
CategoryFunction
CategoryRules
На главную