if you're hoping to find what enemies are casting at you/party members, then you're going to be disappointed. CLEU doesn't fill in these fields for enemies with SPELL_CAST_START. they ARE filled in for the SPELL_CAST_COMPLETE, tho. for friendlies, you get data for targets on all events i believe.
fwiw, there is no more "lilsparky branch". yossa has taken over skillet and merged the lilsparky branch into the main branch. i've since moved on to gnomeworks (which, btw, works with runeforging).
no. the guild trade skills are NOT implemented thru trade links. and the GetTradeSkillListLink() function does not return a valid link when viewing a guild trade skill via the new guild trade skill viewing function.
very lame. i saw that mining was finally "linkable" via the guild profession system only to find it's not really. you can open and view the skills, but you do so with a new api call that requests the trade skill data (ie, it results in TRADE_SKILL_* events firing.
edit: of course, you could *create* a valid trade link by iterating over the trade skill list once a trade skill was opened... it's something i intend to do when i get back to development on gyp. a guild "import" kind of function.
yeah, the skill selection routine is not ideal. what's happening is that the selected skill is being reset when it's done scanning. since scanning might take a while to truly complete, you might be in the middle of something else when gw resets itself.
i'm working on some of the selection code right now so i'll see if i can make that problem go away. it was a bit of hack when i moved to an asynchronous update system instead of just blocking until everything was ready.
local gold = guild:match(goldLoot) or 0
local silver = guild:match(silverLoot) or 0
local copper = guild:match(copperLoot) or 0
local currentTotal = (gold*1000) + (silver*100) + copper
oh yes, you can mix logic and math together like that :)
it's not the logic i was concerned about, it was the use of strings in math operations. i guess lua does an implied "tonumber()" on math operands? i wasn't sure. i know i've gone absolutely crazy pulling "numbers" from strings and using them as things like table indices and couldn't for the life of me figure out why things weren't working right.
GameTooltip:SetHyperlink() is what you're likely after.
the tooltip functions are generally hooked by other mods so that after one of the various special tooltip Set methods are called, these mods will be invoked.
how cool would it be to have a generic in-game scripting language that would handle casting times, protected functions, if-then and loop constructs, events, etc.
for example, you could script out a generic series of actions that takes place under a particular condition (for example, 2v2 arenas).
cast healthstone
trade party1 healthstone
cast healthstone
cast summon felhunter
cast soul link
pet set passive
when needed, a "continue" popup would show up and clicking would do the next protected action.
obviously, this wouldn't be used for combat but rather for the set up prior to combat.
the sorting is currently a bit sketchy due to columns being enabled/disabled and confusing the sorting mechanics. try hard-disabling the skillup% column (from the plugins submenu) and reload to see if it helps.
I have to mention that when I tried to put the "PW:S" part after "all" it didn't work but in front of it made it work.
because it's incorrect syntax. adding the comma and the "All" reference isn't being applied to the list of spells, it's a new field for the table with no reference to any drd key.
under cata, you should also check "IsTradeSkillGuild()" to see if the trade frame is viewing the guild-wide trade skills.
personally, i would assume viewing a link of your own trade skill would be considered as not viewing your trade skill since it's likely the only reason you'd do so is to spoof a tradelink bitmap.
the latter just assures that you get the global version of the function in cases where you might have strfind already defined as a local in a "parent" scope. can't think it'd make any difference in the first few lines of an addon...
personally, i find all of that local = global stuff kind of gratuitous.
"self" is a special local variable inside of a function invoked via the "table:function()" paradigm. it is assigned to be equal to the "table" portion of the function call. in code:
function myAddon:myFunction(arg1,arg2)
...
end
is the same as:
function myAddon.myFunction(self, arg1, arg2)
...
end
and
local x = myAddon:myFunction(a,b)
is equivalent to:
local x = myAddon.myFunction(myAddon, a,b)
so basically, "self" is only valid inside of a function defined via the table:function method unless it's explicitly defined.
you have two "self" references are outside of a function, so they're just normal variable references. since you don't define "self" as a local anywhere, it's looking for a global named self which doesn't exist.
judging by your code, you should probably substitute the "Tql" table in place of the "self" reference in your final two lines.
you're probably better off with a larger delay than a single frame. i went with a generic timer system myself. when i get a bag update, i check to see if i have a timer running and if i do, i reset it to its full duration. otherwise, i create a new timer with something like a .1 or .25 second delay. the timer executes by processing function when it's expired.
b = string.match(string.format("%.1f",1/5),"([^0-9])")
a = b=="." and "," or "."
very offtopic: I'm confused by this programming logic/syntax
This is what my logic thinking says it is:
a = true and "something" or "somethingElse"
I saw this kind of stuff before, but never understood it.
Is this from Lua specifically and is there any doc/info about this "logic"?
I mean, normally there is something like:
if (a and b) or c then
--doStuff
end
yeah, the boolean stuff in lua is a bit quirky, but pretty nice. i'm with you that it seems odd because i'm used to such logic operations as being either true of false. in lua, they actually retain their value/type.
"a = 5 or 6" results in a = 5
"a = 5 and 6" results in a = 6
0
0
0
very lame. i saw that mining was finally "linkable" via the guild profession system only to find it's not really. you can open and view the skills, but you do so with a new api call that requests the trade skill data (ie, it results in TRADE_SKILL_* events firing.
edit: of course, you could *create* a valid trade link by iterating over the trade skill list once a trade skill was opened... it's something i intend to do when i get back to development on gyp. a guild "import" kind of function.
0
i'm working on some of the selection code right now so i'll see if i can make that problem go away. it was a bit of hack when i moved to an asynchronous update system instead of just blocking until everything was ready.
0
it's not the logic i was concerned about, it was the use of strings in math operations. i guess lua does an implied "tonumber()" on math operands? i wasn't sure. i know i've gone absolutely crazy pulling "numbers" from strings and using them as things like table indices and couldn't for the life of me figure out why things weren't working right.
0
0
the tooltip functions are generally hooked by other mods so that after one of the various special tooltip Set methods are called, these mods will be invoked.
check out the GameTooltip widget type at wowpedia. http://www.wowpedia.org/Widget_API#GameTooltip
0
for example, you could script out a generic series of actions that takes place under a particular condition (for example, 2v2 arenas).
cast healthstone
trade party1 healthstone
cast healthstone
cast summon felhunter
cast soul link
pet set passive
when needed, a "continue" popup would show up and clicking would do the next protected action.
obviously, this wouldn't be used for combat but rather for the set up prior to combat.
0
0
because it's incorrect syntax. adding the comma and the "All" reference isn't being applied to the list of spells, it's a new field for the table with no reference to any drd key.
0
personally, i would assume viewing a link of your own trade skill would be considered as not viewing your trade skill since it's likely the only reason you'd do so is to spoof a tradelink bitmap.
0
personally, i find all of that local = global stuff kind of gratuitous.
0
is the same as:
and
is equivalent to:
so basically, "self" is only valid inside of a function defined via the table:function method unless it's explicitly defined.
you have two "self" references are outside of a function, so they're just normal variable references. since you don't define "self" as a local anywhere, it's looking for a global named self which doesn't exist.
judging by your code, you should probably substitute the "Tql" table in place of the "self" reference in your final two lines.
0
0
yeah, the boolean stuff in lua is a bit quirky, but pretty nice. i'm with you that it seems odd because i'm used to such logic operations as being either true of false. in lua, they actually retain their value/type.
"a = 5 or 6" results in a = 5
"a = 5 and 6" results in a = 6