Page 1 of 1

[1.0] Gauntlets reduce energy for melee/shooting speed

Posted: Mon Feb 18, 2013 11:26 pm
by jenx
Using lukep's addon, I've been studying speed.

If you attack with a weapon or shooter, wearing gloves, your attack speed is as expected. But if you wear gauntlets, the energy used per attack increases by 10%.

So a regular melee attack takes 1100 energy with gauntlets, but 1000 with gloves.

My archer with Rapid Shot at 5/5 takes 667 energy with gauntlets, but 606 with gloves.

Thus I'll be wearing gloves from now on.

Is this a bug or an undocumented feature?

Re: [1.0] Gauntlets reduce energy for melee/shooting speed

Posted: Tue Feb 19, 2013 1:03 am
by lukep
That's a bug with my addon, unless I'm missing something big in my code dive.

I'm calling self:combatSpeed(), which is returning self.combat as the weapon by default. If there was a simple way of getting the weapon, I'd use that instead.

Combat.lua:

Code: Select all

1048 --- Gets the weapon speed
1049 function _M:combatSpeed(weapon)
1050         weapon = weapon or self.combat or {}
1051         return (weapon.physspeed or 1) / self.combat_physspeed
1052 end
An easy way to check this would be to compare how much time/energy is actually used, instead of going off of what it calculates.

Re: [1.0] Gauntlets reduce energy for melee/shooting speed

Posted: Tue Feb 19, 2013 12:03 pm
by jenx
I think it is an addon error.

Could you use a routine like this to get weapon info, from Combat.lua:

Code: Select all

-- Check if actor is unarmed
function _M:isUnarmed()
	local unarmed = true
	if not self:getInven("MAINHAND") or not self:getInven("OFFHAND") then return end
	local weapon = self:getInven("MAINHAND")[1]
	local offweapon = self:getInven("OFFHAND")[1]
	if weapon or offweapon then
		unarmed = false
	end
	return unarmed
end