WowAddons

World of Warcraft Forever API · C_EncounterWarnings.md, for your AI

C_EncounterWarnings

10 functions, 1 events, 1 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_EncounterWarnings.GetColorForSeverity

color = C_EncounterWarnings.GetColorForSeverity(severity)

Arguments

severityEncounterEventSeverity

Returns

colorcolorRGBA

C_EncounterWarnings.GetEditModeWarningInfo

warningInfo = C_EncounterWarnings.GetEditModeWarningInfo(severity)

Arguments

severityEncounterEventSeverity

Returns

warningInfoEncounterWarningInfo

C_EncounterWarnings.GetPlayCustomSoundsWhenHidden

play = C_EncounterWarnings.GetPlayCustomSoundsWhenHidden()

Returns true if custom sound alerts are allowed to play for hidden warning messages.

Returns

playbool

C_EncounterWarnings.GetSoundKitForSeverity

soundKitID = C_EncounterWarnings.GetSoundKitForSeverity(severity)

Arguments

severityEncounterEventSeverity

Returns

soundKitIDnumber

C_EncounterWarnings.GetWarningsShown

shown = C_EncounterWarnings.GetWarningsShown()

Returns true if text messages for encounter events are allowed to be shown.

Returns

shownbool

C_EncounterWarnings.IsFeatureAvailable

isAvailable = C_EncounterWarnings.IsFeatureAvailable()

Returns

isAvailablebool

C_EncounterWarnings.IsFeatureEnabled

isAvailableAndEnabled = C_EncounterWarnings.IsFeatureEnabled()

Returns

isAvailableAndEnabledbool

C_EncounterWarnings.PlaySound

soundHandle = C_EncounterWarnings.PlaySound(severity)

May return nothing.

Arguments

severityEncounterEventSeverity

Returns

soundHandlenumber

C_EncounterWarnings.SetPlayCustomSoundsWhenHidden

C_EncounterWarnings.SetPlayCustomSoundsWhenHidden(play)

Controls whether custom sound alerts for encounter events are allowed to play for warning messages that are hidden.

Arguments

playboolIf true, allow playing custom sound alerts. Note that sound alerts will not be played if the encounter warnings feature has been disabled.

C_EncounterWarnings.SetWarningsShown

C_EncounterWarnings.SetWarningsShown(shown)

Controls whether text messages for encounter events are allowed to be shown.

Arguments

shownboolIf false, hides all warning messages in the default UI.

Events

ENCOUNTER_WARNING

encounterWarningInfoEncounterWarningInfo

Tables

EncounterWarningInfo structure

textcstring
casterGUIDWOWGUID
casterNamecstring
targetGUIDWOWGUID
targetNamecstring
iconFileIDnumber
tooltipSpellIDnumber
isDeadlybool
colorcolorRGBA
durationSeconds
severityEncounterEventSeverity
shouldPlaySoundbool
shouldShowChatMessagebool
shouldShowWarningbool

Você precisa do WowAddons

Grátis, para Windows, macOS e Linux: coloca o addon no seu jogo em um clique e o mantém atualizado. Abra uma vez e clique em Instalar de novo.

O WowAddons roda no seu computador: abra wowaddons.gg nele.

Baixar para Windows