Jass:GetTransmissionDuration – Mappedia

Jass:GetTransmissionDuration

Aus Mappedia
Wechseln zu: Navigation, Suche
Funktion: GetTransmissionDuration
Parameter: sound
integer
real
Rückgabewert: real
Autor: Blizzard
Quelle: Blizzard.j
Synchron: Unbekannt



Code

function GetTransmissionDuration takes sound soundHandle, integer timeType, real timeVal returns real
    local real duration

    if (timeType == bj_TIMETYPE_ADD) then
        set duration = GetSoundDurationBJ(soundHandle) + timeVal
    elseif (timeType == bj_TIMETYPE_SET) then
        set duration = timeVal
    elseif (timeType == bj_TIMETYPE_SUB) then
        set duration = GetSoundDurationBJ(soundHandle) - timeVal
    else
        // Unrecognized timeType - ignore timeVal.
        set duration = GetSoundDurationBJ(soundHandle)
    endif

    // Make sure we have a non-negative duration.
    if (duration < 0) then
        set duration = 0
    endif
    return duration
endfunction

Parameter

Typ Name Beschreibung
sound soundHandle
integer timeType
real timeVal
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Warcraft-Mapping
Werkzeuge