# Duration Of Behavior On Unit

Grammar — Get behavior duration on unit unit
FlagsNative | Function

Gets a behavior duration on a unit.

# Arguments

  • unit — Unit
  • string [ gamelink::Behavior ] — Behavior

Returns — fixed

native fixed UnitBehaviorDurationTotal(
	unit inUnit,
	string behavior,
);

Category: Behavior / Basic

# Examples

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L9441
UnitBehaviorDurationTotal(lv_target, lv_triggeringPoison)
// L9462
UnitBehaviorDurationTotal(lv_target, lv_triggeringPoison)
// L11517
UnitBehaviorDurationTotal(lv_eTC, "L90ETCMoshPitChannel")
// L11525
UnitBehaviorDurationTotal(lv_eTC, "L90ETCMoshPitChannel")
// L12265
UnitBehaviorDurationTotal(lv_leoric, "LeoricUndying")
// L12270
UnitBehaviorDurationTotal(lv_leoric, "LeoricUndying")
// L19816
UnitBehaviorDurationTotal(lv_rexxarUnit, "RexxarSpiritBondCooldown")

# mods/heroesdata.stormmod

GameLib.galaxy

// L15305
UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior())
// L15403
UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior())
// L15445
UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior())
// L20153
UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior())

# mods/heroesdata.stormmod

UILib.galaxy

// L4277
UnitBehaviorDurationTotal(lv_heroUnit, libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lp_player])
// L4299
UnitBehaviorDurationTotal(lv_heroUnit, libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayerRight[lp_player])
// L6356
UnitBehaviorDurationTotal(lp_killedUnit, "Dead")

# mods/heroesmapmods/battlegroundmapmods/towersofdoom.stormmod

LibMTOD.galaxy

// L2413
UnitBehaviorDurationTotal(EventUnit(), "StructureOwnershipChangeRepairBehavior")
// L2515
UnitBehaviorDurationTotal(EventUnit(), "StructureOwnershipChangeRepairBehavior")
// L2573
UnitBehaviorDurationTotal(EventUnit(), "StructureOwnershipChangeRepairBehavior")

# mods/heromods/ana.stormmod

LibHANA.galaxy

// L175
UnitBehaviorDurationTotal(lv_sleepUnit, lv_sleepBehavior)

# mods/heromods/dva.stormmod

LibHDVA.galaxy

// L372
UnitBehaviorDurationTotal(lv_dVaMechUnit, "DVaMechCallMechDisabler")

# mods/heromods/malthael.stormmod

LibHMTH.galaxy

// L302
UnitBehaviorDurationTotal(lv_zeratul, "MalthaelTormentedSoulsBuff")

# mods/heromods/zarya.stormmod

LibHZAR.galaxy

// L494
UnitBehaviorDurationTotal(UnitBehaviorEffectUnit(lv_stunnedUnit, "ZaryaGravitonSurgePull", c_effectUnitCaster, 0), "ZaryaGravitonSurgeCasterDuration")
// L537
UnitBehaviorDurationTotal(UnitBehaviorEffectUnit(lv_stunnedUnit, "ZaryaGravitonSurgePull", c_effectUnitCaster, 0), "ZaryaGravitonSurgeCasterDuration")

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L16581
UnitBehaviorDurationTotal(lv_u, lv_behavior)
// L25009
UnitBehaviorDurationTotal(lv_unit, lv_behavior)
// L28027
UnitBehaviorDurationTotal(lv_darkTemplar, "ZeratulDarkTemplarRetreatCooldown")