Referencia › Referencia de funciones › Conditions

Conditions.spatial.combatFilter

dependencia

Llamar como

Conditions.spatial.combatFilter(value, cache, unit)

Registra la dependencia Conditions.spatial.combatFilter y después llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa el objeto tú mismo.

Qué hace

Applies the In Combat option of Distance Count to one unit: with the option off every unit passes, with it on the unit must be in combat (UnitAffectingCombat).

Argumentos

NombreTipoQué hace
valuetableThe Distance Count condition value; its incombat field turns the filter on.
cachetableThe evaluation cache the reads go through.
unitstringToken of the unit being counted.

Retornos

1boolean | nilTrue when the unit passes; nil when its combat state cannot be read.
2string | nilReason code when the first result is nil.

Ediciones

Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar usa una alternativa o devuelve nil con un motivo.

  • No disponible en esa edición (el motivo aparece en la información emergente)
  • Solo mientras estén activas las alternativas de Blizzard para API obsoletas
API del juegoClassic EraTBC AnniversaryClassic ProgressionForeverRetail
UnitAffectingCombatClassic EraTBC AnniversaryClassic ProgressionForeverRetail

Cómo la llama el addon

Dependencias

Código fuente

Conditions/spatial.lua, línea 673. Solo lectura en el juego; Duplicar crea una copia editable.

Conditions.spatial.combatFilter(value, cache, unit)
    if not value.incombat then return true end
    local fighting,why=booleanRead(cache,UnitAffectingCombat,unit)
    if fighting==nil then return nil,why end
    return fighting

Volver a Referencia de funciones