• 0

    posted a message on DrDamage - Official Thread
    ah yes Focused Fire I completely forgot about that, thank you :)
    Posted in: General AddOns
  • 0

    posted a message on DrDamage - Official Thread
    150 + basedmg/basespeed * 2.8 + 0.2 * RAP it is.
    and to get more detailed:
    http://eu.wowarmory.com/character-sheet.xml?r=Tirion&n=Rednaxela
    steady shot tooltip:
    my spreadsheet: http://rapidshare.com/files/100429959/hunter.ods

    so tooltip dmg is:
    min 453
    max 546
    avg 500

    spreadsheet dmg is:
    min 444,16
    max 534,88
    avg 489,52

    as i said. not much but i don't know where my mistake is.
    Posted in: General AddOns
  • 0

    posted a message on DrDamage - Official Thread
    the numbers are the same as with my first workaround code now. so its working fine. still a bit off but i am to lazy to look into that at the moment :)
    thanks for the quick help anyway
    Posted in: General AddOns
  • 0

    posted a message on DrDamage - Official Thread
    could be a localization problem then.
    because the german decimal sign is "," and not "." (probably because of the metric system or something ;))
    I actuacly tested tonumber() with both "123,456" and "123.456" and none worked but what the hell. it programming so nothing ever works the way you would expect it ;)
    If I find some time tomorrow after school, I'll test tonumber() again and maybe find something useful to solve this.
    Posted in: General AddOns
  • 0

    posted a message on DrDamage - Official Thread
    speaking of weaponspeeds...
    some time ago i was wondering why your steady shot values were so weird. So i did a spreadsheet to see what they should be and looked at your code to see if i could find the point where things went wrong :)
    and what i found was:
    "Melee.lua"
    	if self:Melee_CheckBaseStats() then
    		self:RefreshWeaponType()
    	
    		mhSpeed, ohSpeed = UnitAttackSpeed("player")
    		rgSpeed = UnitRangedDamage("player")
    		rgMin, rgMax = 0, 0
    
    		if GT:SetInventoryItem("player", GetInventorySlotInfo("MainHandSlot")) then 
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and tonumber(string_match(line,"%d+\.%d+"))		
    				if line then
    					mhSpeed = line
    					break
    				end
    			end
    		end
    		if GT:SetInventoryItem("player", GetInventorySlotInfo("SecondaryHandSlot" )) then
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and tonumber(string_match(line,"%d+\.%d+"))
    				if line then
    					ohSpeed = line
    					break					
    				end
    			end
    		end
    		if GT:SetInventoryItem("player", GetInventorySlotInfo("RangedSlot")) then
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and tonumber(string_match(line,"%d+\.%d+"))		
    				if line then
    					rgSpeed = line
    					rgMin, rgMax = Deformat(GT:GetLine(i), DAMAGE_TEMPLATE)
    					rgMin = (rgMin or 0)
    					rgMax = (rgMax or 0)
    					break
    				end
    			end
    		end

    the thing is: "tonumber" doesn't seem to work for decimalstrings which means "line" is always nil and the "if" will never be executed.
    So rgMin and rgMax will never be set to anything other than 0. Then the steady shot calculation gets messed up because it relies on them being set right and for a little extra bonus: reading weapon speed from the tooltips doesn't work for the same reason :)

    as a "dirty but worky" quickfix you could do something like this

    		if GT:SetInventoryItem("player", GetInventorySlotInfo("MainHandSlot")) then 
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and string_match(line,"%d+\.%d+")
    				if line then
    					local pre = string_match(line,"%d+")
    					local post = string_match(line,"%d+", 3)
    					pre = pre and tonumber(pre)
    					post = post and tonumber(post)
    					line = pre + (post/100)
    					mhSpeed = line
    					break
    				end
    			end
    		end
    		if GT:SetInventoryItem("player", GetInventorySlotInfo("SecondaryHandSlot" )) then
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and string_match(line,"%d+\.%d+")
    				if line then
    					local pre = string_match(line,"%d+")
    					local post = string_match(line,"%d+", 3)
    					pre = pre and tonumber(pre)
    					post = post and tonumber(post)
    					line = pre + (post/100)
    					ohSpeed = line
    					break					
    				end
    			end
    		end
    		if GT:SetInventoryItem("player", GetInventorySlotInfo("RangedSlot")) then
    			for i = 3, GT:NumLines() do
    				local line = GT:GetLine(i,true)
    				line = line and string_match(line,"%d+\.%d+")
    				if line then
    					local pre = string_match(line,"%d+")
    					local post = string_match(line,"%d+", 3)
    					pre = pre and tonumber(pre)
    					post = post and tonumber(post)
    					line = pre + (post/100)
    					rgSpeed = line
    					rgMin, rgMax = Deformat(GT:GetLine(i), DAMAGE_TEMPLATE)
    					rgMin = (rgMin or 0)
    					rgMax = (rgMax or 0)
    					break
    				end
    			end
    		end

    looks unbelievable ugly because of all the double code but it works.
    Kind of... at least.
    The values shown by DrDamage are still a bit higher than what i calculated in my spreadsheet but i can't realy find where that comes from.
    Your "normalized Weapondamage" is the same as mine, you get the same amount of ranged ap from the API and you are only adding 20% of that to the steady shot damage. But i did not check the actual adding (did not find it :D). Thats just what i assume because in the Hunter.lua it says something about "APBonus = 0.2"
    Posted in: General AddOns
  • To post a comment, please or register a new account.