Пользовательские дополнения
На главную
rules.GetEventBySysName( sysName, getHidden )
Получить id игрового эвента по его sysName (см. поле sysName у rules.GetEventInfo( eventRuleId )).
-- библиотека:
rules
-- объявление:
function GetEventBySysName( sysName, getHidden )
-- параметры:
sysName: string - нелокализуемый строковый идентификатор
getHidden: Boolean or nil - передавать идентификаторы скрытых эвентов, по умолчанию false
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
EventMissionRuleAdded
EventMissionRuleChanged
EventMissionRuleCounterChanged
EventMissionRuleRemoved
EventMissionRulesChanged
EventNewsPostLoaded
EventNewsPostSelected
EventWishmasterChanged
EventWishmasterMultiplying
FunctionRulesBillingInfoGetBonuses
FunctionRulesBillingInfoGetBonusInfo
FunctionRulesBillingInfoUpdate
FunctionRulesGetEventByRuleId
FunctionRulesGetEventBySysName
FunctionRulesGetEventCounter
FunctionRulesGetEventInfo
FunctionRulesGetEvents
FunctionRulesGetEventTimeIntervals
FunctionRulesGetNotificationInfo
FunctionRulesGetWishmaster
FunctionRulesGetWishmasterMultiplyingInfos
FunctionRulesGetZonesMaps
FunctionRulesWishmasterRollMultiplying
RuleId
WishmasterResourceId
CategoryLuaApi
CategoryFunction
CategoryRules
На главную