1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
ZO_BUFF_DEBUFF_LONG_EFFECT_DURATION_SECONDS = 60
local BLINK_THRESHOLD_S = 2
return IsInGamepadPreferredMode ( ) and "EsoUI/Art/ActionBar/Gamepad/gp_abilityFrame_buff.dds" or "EsoUI/Art/ActionBar/abilityFrame_buff.dds"
end
return IsInGamepadPreferredMode ( ) and "EsoUI/Art/ActionBar/Gamepad/gp_abilityFrame_debuff.dds" or "EsoUI/Art/ActionBar/abilityFrame_debuff.dds"
end
---------------
--Base Object--
---------------
return object
end
self . template = template
self . sortedBuffs = { }
self . sortedDebuffs = { }
end
end
return self . template
end
local function IsVisible ( containerObject , effectType , timeStarted , timeEnding , permanent , castByPlayer )
local effectTypeSetting = ( effectType == BUFF_EFFECT_TYPE_BUFF ) and BUFFS_SETTING_BUFFS_ENABLED or BUFFS_SETTING_DEBUFFS_ENABLED
if effectType == BUFF_EFFECT_TYPE_BUFF then
elseif effectType == BUFF_EFFECT_TYPE_DEBUFF and not castByPlayer then
visible = visible and containerObject : GetVisibilitySetting ( BUFFS_SETTING_DEBUFFS_ENABLED_FOR_TARGET_FROM_OTHERS )
end
end
if permanent then
else
local duration = timeEnding - timeStarted
if duration >= ZO_BUFF_DEBUFF_LONG_EFFECT_DURATION_SECONDS then
end
end
end
end
local uid = 1
if unitTag == "player" then
--Artificial effects--
local displayName , iconFile , effectType , sortOrder , timeStarted , timeEnding = GetArtificialEffectInfo ( effectId )
local duration = timeEnding - timeStarted
local permanent = duration == 0
{
buffName = displayName ,
timeStarted = timeStarted ,
timeEnding = timeEnding ,
iconFilename = iconFile ,
stackCount = 0 ,
effectType = effectType ,
uid = uid ,
duration = duration ,
permanent = permanent ,
sortOrder = sortOrder ,
effectId = effectId ,
isArtificial = true ,
}
local appropriateTable = ( data . effectType == BUFF_EFFECT_TYPE_BUFF ) and self . sortedBuffs or self . sortedDebuffs
uid = uid + 1
end
end
end
local buffName , timeStarted , timeEnding , buffSlot , stackCount , iconFilename , buffType , effectType , abilityType , statusEffectType , abilityId , _ , castByPlayer = GetUnitBuffInfo ( unitTag , i )
local duration = timeEnding - timeStarted
local permanent = duration == 0
{
buffName = buffName ,
timeStarted = timeStarted ,
timeEnding = timeEnding ,
buffSlot = buffSlot ,
stackCount = stackCount ,
iconFilename = iconFilename ,
buffType = buffType ,
effectType = effectType ,
abilityType = abilityType ,
statusEffectType = statusEffectType ,
abilityId = abilityId ,
uid = uid ,
duration = duration ,
castByPlayer = castByPlayer ,
permanent = permanent ,
isArtificial = false ,
}
local appropriateTable = ( data . effectType == BUFF_EFFECT_TYPE_BUFF ) and self . sortedBuffs or self . sortedDebuffs
uid = uid + 1
end
end
if # self . sortedBuffs then
end
if # self . sortedDebuffs then
end
end
end
local NO_LEADING_EDGE = false
local durationLabel = buffDebuffControl . duration
if showDuration then
if buffDebuffControl . blinkAnimation and timeRemainingS <= BLINK_THRESHOLD_S then
end
end
if buffDebuffControl . showCooldown then
local cooldownControl = buffDebuffControl . cooldown
cooldownControl : StartCooldown ( timeRemainingS * 1000 , data . duration * 1000 , CD_TYPE_RADIAL , CD_TIME_TYPE_TIME_UNTIL , NO_LEADING_EDGE )
end
end
local timeLeftString
if timeRemainingS >= ZO_ONE_MINUTE_IN_SECONDS then
timeLeftString = ZO_FormatTime ( timeRemainingS , TIME_FORMAT_STYLE_SHOW_LARGEST_UNIT , TIME_FORMAT_PRECISION_SECONDS , TIME_FORMAT_DIRECTION_DESCENDING )
elseif timeRemainingS <= 0 then
timeLeftString = 0
else
end
end
end
end
end
end
else
end
else
end
end
--Default function sorts buffs before debuffs, then oldest before newest, then alphabetical
--The uid ensure we don't get hung up on bad buff data (i.e.: duplicates)
if buffData1 . effectType == buffData2 . effectType then
if buffData1 . timeStarted == buffData2 . timeStarted then
if buffData1 . buffName == buffData2 . buffName then
return buffData1 . uid < buffData2 . uid
else
return buffData1 . buffName < buffData2 . buffName
end
else
return buffData1 . timeStarted < buffData2 . timeStarted
end
else
return buffData1 . effectType == BUFF_EFFECT_TYPE_BUFF
end
end
---------------------------
--Center Out Style Object--
---------------------------
--[[This style puts the buffs left-of-center and the debuffs right-of-center,
each starting in the middle and working their way out
Example:
| B5 B4 B3 B2 B1 D1 D2 __ __ __ |]] --
end
end
end
end
if buffData1 . effectType == buffData2 . effectType then
if buffData1 . effectType == BUFF_EFFECT_TYPE_BUFF then
if buffData1 . timeStarted == buffData2 . timeStarted then
return buffData1 . buffName > buffData2 . buffName
else
return buffData1 . timeStarted > buffData2 . timeStarted
end
else
if buffData1 . timeStarted == buffData2 . timeStarted then
return buffData1 . buffName <= buffData2 . buffName
else
return buffData1 . timeStarted < buffData2 . timeStarted
end
end
else
return buffData1 . effectType == BUFF_EFFECT_TYPE_BUFF
end
end
ZO_BUFF_DEBUFF_CENTER_OUT_STYLE = ZO_BuffDebuffCenterOutStyle : New ( "ZO_BuffDebuffCenterOutStyle_Template" )
---------------------------
--Spiral Out Style Object--
---------------------------
--[[This style puts the buffs first, followed by the debuffs, with the entire grouping centered together.
Each section (buff vs debuff) is layed out such that the first one sorted is in the middle of the group
and the subsequent entries alternate to the right and left
Example:
| B5 B3 B1 B2 B4 B6 D3 D1 D2 |]] --
end
self . spiraledTable = { }
end
do
if # sortedTable then
spiraledTable [ indexOneSpiralPosition ] = sortedTable [ 1 ]
for i = 2 , # sortedTable do
local spiralIndex
if i % 2 == 0 then
spiralIndex = i / 2 + indexOneSpiralPosition
else
end
spiraledTable [ spiralIndex ] = sortedTable [ i ]
end
end
end
end
end
end
end
ZO_BUFF_DEBUFF_SPIRAL_OUT_STYLE = ZO_BuffDebuffSpiralOutStyle : New ( "ZO_BuffDebuffAllCenteredStyle_Template" )
---------------------------
--Expires In Style Object--
---------------------------
--[[This style puts both bufffs and debuffsin a single container centered on the units health bar,
each starting in the middle and working their way out, with buffs/debuffs expiring sooner towards the middle
Example:
| B5 B4 B3 B2 B1 D1 D2 |]] --
end
end
end
end
if buffData1 . effectType == buffData2 . effectType then
local buff1Permenant = buffData1 . duration == 0
local buff2Permenant = buffData2 . duration == 0
if buffData1 . effectType == BUFF_EFFECT_TYPE_BUFF then
if buff1Permenant and buff2Permenant then
return buffData1 . buffName > buffData2 . buffName
else
if buff1Permenant then
return true
elseif buff2Permenant then
return false
end
if buffData1 . timeEnding == buffData2 . timeEnding then
return buffData1 . buffName > buffData2 . buffName
else
return buffData1 . timeEnding > buffData2 . timeEnding
end
end
else
if buff1Permenant and buff2Permenant then
return buffData1 . buffName < buffData2 . buffName
else
if buff1Permenant then
return false
elseif buff2Permenant then
return true
end
if buffData1 . timeEnding == buffData2 . timeEnding then
return buffData1 . buffName < buffData2 . buffName
else
return buffData1 . timeEnding < buffData2 . timeEnding
end
end
end
else
return buffData1 . effectType == BUFF_EFFECT_TYPE_BUFF
end
end
ZO_BUFF_DEBUFF_EXPIRES_IN_STYLE = ZO_BuffDebuffExpiresInStyle : New ( "ZO_BuffDebuffAllCenteredStyle_Template" ) |