Comments on changesets

User picture

By Pilus (changeset: 739) May 13, 2012 @ 08:45am UTC

Thanks for adding that again. I had some trouble with my svn yesterday
User picture

By Pilus (changeset: 723) May 06, 2012 @ 04:49pm UTC

That is because you are creating it when the file loads. At that point the localization library is not yet available. This is mainly an issue in when localizing GHM. You should be able to fix it with the following alternative:

local loc;
local frame  = CreateFrame("Frame");
frame:RegisterEvent("VARIABLES_LOADED");
frame:SetScript("OnEvent",function()
     loc = GHI_Loc();
end
User picture

By Aurorablade (changeset: 723) May 06, 2012 @ 02:47am UTC

I get an error that i can't acess GHI_Loc though.
User picture

By Pilus (changeset: 723) May 05, 2012 @ 08:44am UTC

You are implementing it the correct way in the comments. Just replace the string with what you wrote in the comments.
User picture

By Pilus (changeset: 691) Apr 07, 2012 @ 09:21pm UTC

Regarding the StaticPopupDialogs, I think it can be missused.
E.g. now GHI scripts would be able to call:
StaticPopupDialogs["USE_GUILDBANK_REPAIR"].accept();
This would automatically accept a guild bank repair, if that dialogbox is shown. etc
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

I have reviewed the circle check. The comments from that also applies to the square version of it. I will add a function to help calculating if the player is within a the square.
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

Change this to:
dyn.SetOutput("currentPos",Cor.GetPlayerPos())
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

Instead of currentPos, you need to find the position that are determined by the input. When you have added the input it will look something like:
local targetPos = {
   x = dyn.GetInput("x"),
   y = dyn.GetInput("y"),
   continent = dyn.GetInput("continent"),
}
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

It would enough to check it with
if inRange then
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

should be
local Cor = GHI_Position();
User picture

By Pilus (changeset: 614) Feb 01, 2012 @ 09:59pm UTC

should be:
local inRange = Cor.IsPosWithinRange(targetPos,range)
User picture

By Pilus (changeset: 613) Jan 29, 2012 @ 10:30am UTC

Looks good. I only got one small comment to it, in total.
User picture

By Pilus (changeset: 613) Jan 29, 2012 @ 10:30am UTC

The description could be a little more clear
User picture

By Pilus (changeset: 612) Jan 28, 2012 @ 12:46am UTC

I will not say that any output is needed in this action.
User picture

By Pilus (changeset: 612) Jan 28, 2012 @ 12:46am UTC

We do ofcause need the type 'sound'. I will add it to the list of dynamic types. You should then change this one into the type 'sound' instead of string
User picture

By Pilus (changeset: 612) Jan 28, 2012 @ 12:46am UTC

I dont think it is relevant with a no sound port, as there will always be given a string as targetSound. I would say to trigger the same out port in all cases.
User picture

By Pilus (changeset: 605) Jan 20, 2012 @ 03:46pm UTC

In pairs({GetProfessions()}) all the arguments of GetProfessions are put into a table (the { } part). Then this table is given to the pairs operation.
That means that in the "for _,prof in pairs({GetProfessions()}) do" prof will first be the index for prof1, then prof2 in next loop, then archaeology and so on.
User picture

By Aurorablade (changeset: 605) Jan 20, 2012 @ 02:05pm UTC

when i didn't change it i was in a 'wait do i need this part of code' mindset..will change in a bit there.
and i am not sure the code would work as it works like this
http://wowprogramming.com/docs/api/GetProfessions

prof1, prof2, archaeology, fishing, cooking, firstAid = GetProfessions()

Returns:

prof1 - The index of the first profession; nil if first profession is missing (number)
prof2 - The index of the second profession; nil if second profession is missing (number)
archaeology - The index of Archeology; nil if Archeology is missing (number)
fishing - The index of Fishing; nil if Fishing is missing (number)
cooking - The index of Cooking; nil if Cooking is missing (number)
firstAid - The index of First Aid; nil if First Aid is missing (number)

the indexes you then pass to
http://wowprogramming.com/docs/api/GetProfessionInfo

name, texture, rank, maxRank, numSpells, spelloffset, skillLine, rankModifier = GetProfessionInfo(index)

Arguments:

index - The index of the profession (can be found with GetProfessions()) (number)

Returns:

name - Localized name of the skill (string)
texture - Path to the icon texture of the skill (string)
rank - The current skill level. This does not change when rankModifier is greater than 0 (number)
maxRank - The current skill cap (number)
numSpells - The number of abilities/icons listed. These are the icons you put on your action bars (number)
spelloffset - (number)
skillLine - The constant value of the skill (e.g. Archeology is 794, Cooking is 185). These constants can be found in the enum that includes other constants, such as talent spec, race, language, pet type, and mount type (number)
rankModifier - Additional modifiers to your profession levels (e.g. Lures for Fishing). (number)

though it might work and i might need more coffee at this point in time.
User picture

By Pilus (changeset: 605) Jan 19, 2012 @ 01:28pm UTC

It looks quite good overall. I can not see any direct errors in them. There is just some minor things (see my commets on some lines).

You can consider making the prof one more effective by doing something like:

for _,prof in pairs({GetProfessions()}) do
    local name = GetProfessions(prof)
    if name:lower() == targetProf:lower() then
        dyn.TriggerOutPort("hasProf");
    end
end
User picture

By Pilus (changeset: 605) Jan 19, 2012 @ 01:28pm UTC

Copy paste error. The ouporttput is from the other action and needs to be renames to "Does not have prof"
User picture

By Pilus (changeset: 605) Jan 19, 2012 @ 01:28pm UTC

Copy paste error. The output is from the other action and needs to be removed
User picture

By Pilus (changeset: 590) Jan 11, 2012 @ 11:20am UTC

I would prefer that. That also ensures that GHI_GetTimeString function can be used as a general misc function.
User picture

By Katecia (changeset: 590) Jan 11, 2012 @ 10:50am UTC

Makes sense to me. I can put this back in and remove that if you like.
User picture

By Pilus (changeset: 590) Jan 11, 2012 @ 10:44am UTC

It might be the best solution to just remove the 90 value from the slider.
User picture

By Katecia (changeset: 590) Jan 11, 2012 @ 10:35am UTC

That's understandable. The main reason I did it was because when using the duration slider, it shows "1 hour" twice, with no indication that the second one is actually an hour and a half.