Subject | Hash | Author | Date (UTC) |
---|---|---|---|
fix(clearcasting): Lower priority of debuff type | 5e74f3bb6adcf5ee9644a08f839ec6fdf7f59027 | Vladyslav Bondarenko | 2021-11-07 14:27:37 |
feat(clearcasting): Remove individual class profiles | c7b4d8cf1ad3885e8f0bd84f33082a29330f1f18 | Vladyslav Bondarenko | 2021-11-05 18:41:10 |
fix(clearcasting): Correct subset button order when first allocated | f3b52da4b40e436e7dc5fc5bda8c4cdbf2c3f4a7 | Vladyslav Bondarenko | 2021-11-05 13:15:09 |
fix(clearcasting): Subset button clickable and updates slower | ec4768e7b925e52126140788fe866070ee3796c3 | Vladyslav Bondarenko | 2021-11-05 13:05:13 |
fix(clearcasting): Improve subset buttons readabilitiy | a86de677ad80a16372b76c67d1f8baa457f72faa | Vladyslav Bondarenko | 2021-11-04 22:23:53 |
fix(clearcasting)!: Export createSubset correctly | e4a0fdb48ac3e3e63d7e763460fb6ca2d95a1f9f | Vladyslav Bondarenko | 2021-11-04 22:02:35 |
feat(choir): Render debuff type color for subset | cb13282dcb4c42732eccf46821d9ff49e6f8bdff | Vladyslav Bondarenko | 2021-11-04 20:12:49 |
fix(choir)!: Subset auras update in combat | 081493e96ee7c72371f8770d8bbdc9b108db53ac | Vladyslav Bondarenko | 2021-11-04 19:02:16 |
feat(choir)!: Add alternative section creation | 1aac7826a961509021679db26b95071edba77ad8 | Vladyslav Bondarenko | 2021-11-04 17:36:05 |
feat(clearcasting): Add death knight indicators | 5c42814210b355e6de601faaf8e173222995cfa6 | Vladyslav Bondarenko | 2021-10-30 12:23:43 |
feat!: Show spell tooltip on indicator mouseover | dd69f46f1522f49ce942d8e0b3756c609471be7a | Vladyslav Bondarenko | 2021-10-13 01:12:08 |
feat!: Indicator grouping feature | df7e0579a51388dba73bc5d92b3d04369bb0e426 | Vladyslav Bondarenko | 2021-10-13 00:17:28 |
feat!: Redo the core functionality | 085af1bc403b3a9d2d4b99ec460d67889239fabd | Vladyslav Bondarenko | 2021-07-09 11:15:31 |
feat: Track additional auras | 958e52f9808d64ebb816663d2aa22a4eb39a2068 | Vladyslav Bondarenko | 2021-01-22 20:28:13 |
fix!: No longer crash on unknown spell | 65061085f0f55b75910c9ed4d8249b1e8e30f9ee | Vladyslav Bondarenko | 2020-12-11 17:31:16 |
fix: Render indicators properly on first login | bf102cc749cc23d3769a82f10fe93a05afc5277f | Vladyslav Bondarenko | 2020-12-11 14:25:11 |
feat: Add Serendipity and Surge of Light indicators | ba1d0f32a4b8f4f5d4e2730f0a4e409e23b52974 | Vladyslav Bondarenko | 2020-12-10 16:19:55 |
Initial commit | 9b3df418e373218125fec12271084afebb11cfc2 | Vladyslav Bondarenko | 2020-12-04 10:27:24 |
File | Lines added | Lines deleted |
---|---|---|
.luacheckrc | 1 | 0 |
clearcasting.lua | 18 | 13 |
File .luacheckrc changed (mode: 100644) (index e863054..a4687fa) | |||
2 | 2 | stds.wow = { | stds.wow = { |
3 | 3 | globals = {}, -- these globals can be set and accessed. | globals = {}, -- these globals can be set and accessed. |
4 | 4 | read_globals = { | read_globals = { |
5 | "BuffFrame", | ||
5 | 6 | "ChatFrame1", | "ChatFrame1", |
6 | 7 | "CreateFrame", | "CreateFrame", |
7 | 8 | "DEFAULT_CHAT_FRAME", | "DEFAULT_CHAT_FRAME", |
File clearcasting.lua changed (mode: 100644) (index a342677..b98b02c) | |||
... | ... | local function getAuraWeight( | |
570 | 570 | error("invalid argument") | error("invalid argument") |
571 | 571 | end | end |
572 | 572 | ||
573 | durationSec = durationSec or 1 | ||
574 | durationSec = math.max(1, durationSec) | ||
575 | local now = GetTime() | ||
576 | expirationInstance = expirationInstance or now | ||
577 | local weight = 0 | ||
573 | local casterWeight = 0 | ||
578 | 574 | if "player" == casterUnitDesignation then | if "player" == casterUnitDesignation then |
579 | weight = weight + 10000 | ||
575 | casterWeight = 1 | ||
580 | 576 | end | end |
581 | 577 | ||
582 | local categoryMap = {["Magic"] = 4000, ["Poison"] = 3000, ["Disease"] = 2000, ["Curse"] = 1000} | ||
578 | local categoryMap = {["Magic"] = 4, ["Poison"] = 3, ["Disease"] = 2, ["Curse"] = 1} | ||
583 | 579 | local categoryWeight = 0 | local categoryWeight = 0 |
584 | 580 | if category then | if category then |
585 | 581 | categoryWeight = categoryMap[category] or 0 | categoryWeight = categoryMap[category] or 0 |
586 | 582 | end | end |
587 | weight = weight + categoryWeight | ||
588 | 583 | ||
589 | --[[ FIXME Sorting by remained duraiton does not work for all spells for some reason ]]-- | ||
590 | local durationRemainingSec = expirationInstance - now | ||
591 | local durationElapsedSec = durationSec - durationRemainingSec | ||
592 | local durationWeight = durationElapsedSec - durationSec | ||
593 | weight = weight + math.ceil(durationWeight) | ||
584 | local maxDurationWeight = 999 | ||
585 | local durationWeight | ||
586 | if expirationInstance and expirationInstance > 0 and durationSec and durationSec > 0 then | ||
587 | durationWeight = maxDurationWeight / (expirationInstance - GetTime()) | ||
588 | elseif durationSec and durationSec == 0 then | ||
589 | durationWeight = 0 | ||
590 | else | ||
591 | durationWeight = maxDurationWeight | ||
592 | end | ||
593 | durationWeight = math.ceil(durationWeight) | ||
594 | |||
595 | local weight = 0 | ||
596 | weight = weight + 10000 * casterWeight | ||
597 | weight = weight + 10 * durationWeight | ||
598 | weight = weight + 1 * categoryWeight | ||
594 | 599 | ||
595 | 600 | return weight | return weight |
596 | 601 | end | end |