• 0

    posted a message on Mana regen graph
    You are basically asking for "how to calculate mana regen", which is the same problem as "how to calculate DPS". Ever noticed that every combat log parser counts DPS differently? DPS is Damage divided by Time but...

    A) Should "time" only start counting when you enter combat or when you actually start casting your first spell?

    B) What about stopping to cast halfway and continuing later? (Such as getting ressurected)

    C) When should "time" end? When you exit combat? At the end of your last spell? How should DPS be affected if dots continue to tick after you die?

    There is no consistent definition. You will need to come up with your definition of "mana regen over time".
    Posted in: Addon Ideas
  • 0

    posted a message on Frame alpha with multiple textures
    Quote from Beautiuz
    I was also thinking about this. What can be done is making an new addon with just all the icons in circle shape and other addons can refer to those icons instead of the normal ones.

    The biggest problem I see is that you need to support all new icons and that addon need (possible) to be updated on every client patch.


    Generally speaking, if you "override" the default UI's icon textures, it will cause other problems. Many of the icons are reused in other parts of the UI (i.e not the action buttons), and it would look wrong in those places (such as your spells/skills page) if the icons were to become round.
    Posted in: AddOn HELP!
  • 0

    posted a message on Create whisper history
    Please read this page regarding concatenation: http://www.lua.org/pil/3.4.html

    It appears you are confusing us with your usage of the word "concat" and we don't really know what you mean. You can't concat a table, but you can concat multiple strings in a table into a longer string with table.concat().

    Please read this page regarding how to use tables in Lua: http://www.lua.org/pil/2.5.html

    In fact read the whole http://www.lua.org/pil/index.html
    Posted in: AddOn HELP!
  • 0

    posted a message on Table into table, how to concat?
    I think your definition of "concat" isn't what the rest of us think it is.

    "Concat" in Lua means to take several strings and combine them into a single larger string, and the concatenation operator in Lua is 2 dots: ..

    Your question is extremely vague, you did not mention whether you want to concat string keys, string values or keys and values or whatever, nor what you want your result to be.
    Posted in: AddOn HELP!
  • 0

    posted a message on Frame alpha with multiple textures
    That is to say, you will need to split your texture into multiple textures (Photoshop calls them layers), then use 100% alpha on the layers that won't ever change.

    In the case of wow icons, because they are square, and you can't really edit those, you cannot mask out the corners to make them round, the best you can do is make a image on top of it to make it appear rounded - which is what ButtonFacade already does.
    Posted in: AddOn HELP!
  • 0

    posted a message on Frame alpha with multiple textures
    Image masking can't be done in WoW.

    The transparency you want will have to be made into the image itself and then in the addon, the texture has to use a 100% alpha (with all its parents using 100% as well). Anything that isn't 100% alpha will just cause the texture's every pixel to gain that much alpha multiplied in.
    Posted in: AddOn HELP!
  • 0

    posted a message on [XML/UI] Frame alpha with multiple textures [DUPLICATE]
    Locking thread - Duplicate thread here: http://forums.wowace.com/showthread.php?t=19280

    (WowAce and Curseforge are really the same forums, just different skins.)
    Posted in: Need Help?
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED in 4.1
    It doesn't have any practical use as far as I can tell, because the event still fires with all the args and addons can still access it. There might be future code updates in the next PTR patch to elaborate.
    Posted in: AddOn HELP!
  • 0

    posted a message on Icon = Target
    Can't be done. This is a common addon request, but not doable or allowed by Blizzard since about 4 years ago.
    Posted in: Addon Ideas
  • 0

    posted a message on Frame alpha with multiple textures
    Well, It's a bit tricky. What you first need to know is that alpha is multiplied from the parent down to the child. So suppose TextureA and TextureB are both children of FrameM, and TextureA has a alpha of 60% and TextureB has a alpha of 30%, then if you set FrameM's alpha to 50%, the effective alpha of A is 60% * 50% = 30%, and likewise B's effective alpha is 15%.

    The texture's alpha value is then used to show transparency of stuff below it. The solution to this is a not so obvious, but rather easy. Instead of A and B being children of M, create A and B somewhere else in another frame, say DummyFrameX. Then anchor A and B to M. So when you set the alpha of M, it doesn't affect A and B because A and B's parents is X. But when you move M, A and B moves with M because its anchors are with M.

    This solution poses a few problems, because visibility of a frame or texture is based on its parent plus its own visible status. So if M were to Hide() itself, A and B will still be shown because X is still shown. The obtuse solution to this is to to securehook M's Show and Hide event functions to also show/hide the textures A and B.

    Another possibility is to create DummyFrameX as children of M's parent, so that X and M are siblings, and that addon code doesn't actually ever hide M, but only hide M's parent (which presumably hides an entire bar of buttons), so that will also hide X/A/B. Obviously the code will have to setalpha on M specifically, and not M's parent for this to work.

    ----------
    There are 3 hierarchies to take note in frames/textures:

    FrameStrata/FrameLevel/Region - Determines what frames are drawn on top of each other. This purely affects rendering order only.

    Parent/Child relationship - Determines the visibility, scale and alpha only. Parent's alpha and scale are multiplied down to children. So is visibility, if you consider being shown as 1 and being hidden as 0 and multiply that down.

    Anchors - Determines position and size only.

    As you can see, these 3 hierarchies are distinct from each other and does not interfere with each other. You could be obscure and have a frame be on HIGH strata, and its child on LOW strata (so the child is always drawn below), but anchor the child to something else so moving the parent doesn't move the child, but hiding the parent will hide the child. [Generally not recommended as there is no reason to do this, you would rather have the 2 frames not being related to each other at all and show/hide/alpha each one separately in code than to rely on parent/child relationship.]
    Posted in: AddOn HELP!
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED in 4.1
    Blizzard cannot put the new argument at the end because the 9th argument onwards are vararg. Hence any change to the C_L_E_U API will always break all existing addons.
    Posted in: AddOn HELP!
  • 0

    posted a message on Iteration over addons
    Quote from Xinhuan
    The 3rd solution is that you only create your profileAddons table after all addons have loaded (i.e after PLAYER_LOGIN has fired, or in AceAddon-3.0 terminology, do it inside :OnEnable() of your addon).


    I did put this in my post. =.=
    Posted in: Lua Code Discussion
  • 0

    posted a message on Iteration over addons
    Note also that the IsAddOnLoaded() and LoadAddOn() functions take in the folder name of the addon which must match exactly into capitalization (or it will fail on non-windows systems).

    AceAddon-3.0 functions for :NewAddon() and :GetAddon() take in an arbitrary string which may not match the addon's folder name. For example, BigWigs's folder name is "BigWigs" but the AceAddon-3.0 string it is registered under is "BigWigsLoader" (and the string it used with AceLocale-3.0 is "Big Wigs").

    You have to be careful about all these.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Iteration over addons
    It means that your table profileAddons only has 1 table entry in it.

    SimpleAuraFilter and Skada both evaluated to nil, so effectively you were doing this:
    local profileAddons = { ["Grid"]=Grid , ["SimpleAuraFilter"]=nil, ["Skada"]=nil }
    which is equivalent to
    local profileAddons = { ["Grid"]=Grid }
    So when your loop executed, you only had one addon. There are 2 possible causes to this:


    1. The addons SimpleAuraFilter and Skada are not accessible globally (i.e, they aren't explicitly defined in the _G table/no global variable was assigned to the addon). In such cases, you will need to grab the addon via LibStub("AceAddon-3.0"):GetAddon("Skada") as an example, this will vary from addon to addon as to what string the addon is registered under AceAddon-3.0. I assume that you will only be working with addons using Ace3 since your loop calls addon.db:SetProfile() which is an AceDB-3.0 function. Note also that while most addons store their db in addon["db"], that is, in the "db" key of the addon table, they do not necessarily have to.


    2. Your addon loaded before SimpleAuraFilter and Skada are loaded. This is probably because your WoW is installed on a harddisk formatted with the NTFS file system (i.e windows) and your addon's name starts with a letter between G and S (i.e between Grid and SimpleAuraFilter) because NTFS file systems return folders in alphabetical order and WoW loads them in the order returned by the file system. TLDR, when your addon loads, those addons do not exist yet.

    There are 3 solutions to this, the first being that your addon's TOC needs to add all the addons you want to load before yours to the ## OptionalDeps field.

    The second (not recommended) is that you force load those addons with LoadAddOn("Skada") somewhere in your code. If your addon uses AceAddon-3.0, you need to do this before you create your addon with the LibStub("AceAddon-3.0"):NewAddon() call due to ADDON_LOADED firing order dependencies which causes all addons in the waiting list to fire their OnInitialize() functions.

    The 3rd solution is that you only create your profileAddons table after all addons have loaded (i.e after PLAYER_LOGIN has fired, or in AceAddon-3.0 terminology, do it inside :OnEnable() of your addon).

    ----
    Both of the above causes can apply at the same time to your problem, you will need to fix both.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Iteration over addons
    The easiest way to see what the problem is? Go add this line to your loop:

    print(tostring(addon))


    You will find that most of those will print a string like "table: 0x134DA2", and not a string like "Skada" as you expected. The only reason it works on Grid is because that table has a metatable with the "__tostring" metamethod (function) attached that returns the right correctly.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.