Thread Tools Display Modes
05/07/24, 11:59 AM   #1
Toirealach
AddOn Author - Click to view addons
Join Date: Sep 2020
Posts: 30
Current Mundus

Is there an API call to get a chartacter's current Mundus stone? I can't seem to find one. I only see getting the mundus of an armory build.
  Reply With Quote
05/07/24, 01:00 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,004
I do not know any API that returns the info, maybe someone else got a better idea:

One could check it via the player buffs'

Lua Code:
  1. function PrintCharacterBuffs()
  2.     local unitTag = "player"
  3.     local numBuffs = GetNumBuffs(unitTag)
  4.     d("~~~~~~~~~~~~~~~~~~~")
  5.     d("Character buffs #: " ..tos(numBuffs))
  6.     if numBuffs > 0 then
  7.         for i = 1, numBuffs do
  8.             -- get buff infos
  9.             --** --- @return buffName string, timeStarted number, timeEnding number, buffSlot integer, stackCount integer, iconFilename textureName, deprecatedBuffType string, effectType [BuffEffectType|#BuffEffectType], abilityType [AbilityType|#AbilityType], statusEffectType [StatusEffectType|#StatusEffectType], abilityId integer, canClickOff bool, castByPlayer bool
  10.             local buffName, timeStarted, timeEnding, buffSlot, _, iconTexture, buffType, effectType, abilityType, statusEffectType, abilityId, canClickOff = GetUnitBuffInfo(unitTag, i)
  11.             d(">Buff #" ..tos(i)..": " ..tos(buffName) .. ", canClickOff: " ..tos(canClickOff) .. ", buffType: " ..tos(buffType) ..", effectType: " ..tos(effectType).. ", abilityType: " ..tos(abilityType) ..", statusEffectType: " ..tos(statusEffectType) .. ", abilityId: " ..tos(abilityId))
  12.         end
  13.     end
  14.     d("~~~~~~~~~~~~~~~~~~~")
  15. end

This print's the palyer's buffs to the chat as debug messages.
You can check if canCickOff == false and maybe the buffType, effectType etc. could be stating it's a mundus.
In some cases the texture filenames also contain the word mundus or similar and thus you can find it via zo_plainstrfind.
Else the abilityIds should be unique (each mundus should provide have one).
Or maybe the names always start with a word like "Mundus: " (in German it's "Segen: ").
But unfortunately that string prefix is not available as SI* constant as it seems -> Only for the armory again it exists ("Mundus: <<1>>", -- SI_ARMORY_MUNDUS_STONE_LABEL)

Last edited by Baertram : 05/07/24 at 01:03 PM.
  Reply With Quote
05/08/24, 06:15 AM   #3
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 89
Originally Posted by Toirealach View Post
Is there an API call to get a chartacter's current Mundus stone? I can't seem to find one. I only see getting the mundus of an armory build.
You can check my addon "mundus reminder" to see one option to get the curtent mundus stone.

I think I have just a table of the individual abilityIds, but i haven't looked in the code for a while.
  Reply With Quote
05/08/24, 02:55 PM   #4
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 23
As far as I know there is no API that lets you get the current mundus directly. Most addons get that information via a hardcoded dictionary and buff id.

Just in case you need it.

Code:
    local mundusBoons = {
        [13940] = true, -- Boon: The Warrior
        [13943] = true, -- Boon: The Mage
        [13974] = true, -- Boon: The Serpent
        [13975] = true, -- Boon: The Thief
        [13976] = true, -- Boon: The Lady
        [13977] = true, -- Boon: The Steed
        [13978] = true, -- Boon: The Lord
        [13979] = true, -- Boon: The Apprentice
        [13980] = true, -- Boon: The Ritual
        [13981] = true, -- Boon: The Lover
        [13982] = true, -- Boon: The Atronach
        [13984] = true, -- Boon: The Shadow
        [13985] = true -- Boon: The Tower
    }
  Reply With Quote
05/08/24, 04:28 PM   #5
Toirealach
AddOn Author - Click to view addons
Join Date: Sep 2020
Posts: 30
Thanks! That's an easy way to do it.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Current Mundus


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off