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

На главную


rules.GetEventByRuleId( ruleId, getHidden )

Получить id игрового эвента по его RuleId.

-- библиотека:
rules

-- объявление:
function GetEventByRuleId( ruleId, getHidden )

-- параметры:
ruleId: RuleId - идентификатор рула (ресурс эвента)
getHidden: Boolean or nil - передавать идентификаторы скрытых эвентов, по умолчанию false

-- возвращаемое значение:
ObjectId или nil - если эвент не найден, то nil; иначе идентификатор описания правил эвента

Пример:

local eventRuleId = rules.GetEventByRuleId( ruleId )
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

На главную