Originally Posted by XEVENEX
1) Is there a way to determine if you are currently CC immune? Is there a way to check for the swirly animation under your feet?
|
1)
I have no idea if all effect/buffs for immunities are displayed as buffs/effects, but I would start by trying something like this:
Warning: Spoiler
Lua Code:
local numBuffs = GetNumBuffs("player")
for buffIndex = 1, numBuffs do
local effectName, beginTime, endTime, buffSlot, stackCount, iconFilename, buffType, effectType, abilityType, statusEffectType, abilityId, canClickOff = GetUnitBuffInfo("player", buffIndex)
if abilityType == ABILITY_TYPE_IMMUNITY then
-- check for the whatever cc you want:
if statusEffectType == STATUS_EFFECT_TYPE_STUN then
-- immune to stuns
end
end
end
Originally Posted by XEVENEX
2) I'm looking for a way to tell if the reticleover currently has reflective scales or defensive stance up. Is there any way to pull the visual effects from your target? GetUnitBuffInfo('reticleover', x) isn't returning anything useful in this context.
|
I've not tested it, but I would think GetUnitBuffInfo() should work. Almost the same code as above:
Warning: Spoiler
Lua Code:
local numBuffs = GetNumBuffs("reticleover")
for buffIndex = 1, numBuffs do
local effectName, beginTime, endTime, buffSlot, stackCount, iconFilename, buffType, effectType, abilityType, statusEffectType, abilityId, canClickOff = GetUnitBuffInfo("reticleover", buffIndex)
-- figure out what abilityId reflective scales is
if abilityId == ???? then
-- do whatever
end
end
To find the abilityId for reflective scales put it on your action bar, place the mouse cursor over it and type /zgoo mouse in chat (zgoo addon must be installed). The abilityId will be listed as ["actionId"] = xxxxxx
Do note that each rank/morph has a different abilityId...so if you want it to work for all versions of reflective scales you'll have to find all of their abilityId's.
Here is an example of how to do that:
Warning: Spoiler
Lua Code:
-- This must be done on a character that has the ability reflective scales
-- Log on a character that has the reflective scales ability,
-- Using instructions above find any abilityId for that ability and place it here.
-- It does not matter what rank/morph it is
-- Do not use 47569, its just an example. 47569 is for Crystal Fragments
-- then run this code
local skillAbilityId = 47569
local hasProgression, progressionIndex = GetAbilityProgressionXPInfoFromAbilityId(skillAbilityId)
for i=0, 2 do
for j=1, 4 do
local abilityId = GetAbilityProgressionAbilityId(progressionIndex, i, j)
local name = GetAbilityName(abilityId)
d(name..", Morph: "..i..", Rank: "..j..", AbilityId: "..abilityId)
end
end
Then create a table with all of those abilityId's and use it as a lookup to see if any given abilityId represents one of the reflective scales ranks/morphs:
Warning: Spoiler
Lua Code:
local reflectiveScalesAbilityIds = {
[47569] = true,
....
-- do this for each abilityId
}
local numBuffs = GetNumBuffs("reticleover")
for buffIndex = 1, numBuffs do
local effectName, beginTime, endTime, buffSlot, stackCount, iconFilename, buffType, effectType, abilityType, statusEffectType, abilityId, canClickOff = GetUnitBuffInfo("reticleover", buffIndex)
if reflectiveScalesAbilityIds[abilityId] then
-- it is one of the reflective Scales abilities...do whatever
end
end