I think, I found a way, which is really simple, to change der FrameSize (profile) only if I have a specific layout.
So, here my solution:
I'm using reflux and kgPanels to change InGame between 2 diffferent layouts of various Interface elements and options.
One profile is called "ShiningUI", the other is called "ShiningHeal".
So, whenever i tried to change the GridLayout depending on the RaidMembers, it also changed GridProfiles while "ShiningUI" was active, although I just wanted it to happen with "ShiningHeal".
So I made a check, if the current profile-set is "ShiningHeal":
Code:
Sprofile = Skada.db:GetCurrentProfile()
rmems = GetNumRaidMembers()
pmems = GetNumPartyMembers()
if Sprofile == "ShiningHeal" then
if (pmems > 0 and rmems <= 5) then -- group/5-men-raid
Grid.db:SetProfile("profile1")
elseif (rmems > 5 and rmems <= 10) then -- 10-men-raid
Grid.db:SetProfile("profile2")
elseif (rmems > 10 and rmems <= 25) then -- 25-men-raid
Grid.db:SetProfile("profile3")
elseif rmems > 25 then -- Alterac/Isle of Conquest
Grid.db:SetProfile("profile4")
end
else
end
Events to register:
PLAYER_ENTERING_WORLD
RAID_ROSTER_UPDATE
PARTY_MEMBERS_CHANGED
Now, there are different ways to implement this little code:
- Add it in kgPanels
- write a little small AddOn
- paste it in an existing AddOn
I think i'll choose kgPanels - otherwise Curseupdater and so on are complaining about edited files and stuff.'
In the end, no big deal.