AlexFolland / AutoGear

WoW convenience addon that automatically handles gear looting and equipping
https://curseforge.com/wow/addons/autogear
Other
8 stars 11 forks source link

AutoGear displays an error after looting a grey item from a dead enemy #15

Open xan2622 opened 3 years ago

xan2622 commented 3 years ago

Describe the bug AutoGear displays an error after looting a grey item from a dead ennemy.

Steps to reproduce the behavior:

  1. Kill any ennemy (lower than your current level)
  2. Click on its corpse to loot its stuff
  3. You can see that its stuff moves into your bags
  4. The following error appears (an the error counter keeps increasing again and again)

Expected behavior No error after looting

Screenshots error_AutoGear

Version:

The error:

Message: Interface\AddOns\AutoGear\AutoGear.lua:1368: attempt to index upvalue 'weighting' (a nil value)
Time: Mon Apr  5 16:35:18 2021
Count: 86
Stack: Interface\AddOns\AutoGear\AutoGear.lua:1368: attempt to index upvalue 'weighting' (a nil value)
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:1368: in function `AutoGearSetStatWeights'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:2147: in function `AutoGearScanBags'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:3072: in function `AutoGearMain'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:176: in function <Interface\AddOns\AutoGear\AutoGear.lua:175>

Locals: class = "MAGE"
spec = "Givre"
(*temporary) = nil
(*temporary) = "MAGE"
(*temporary) = "Givre"
(*temporary) = "Givre"
(*temporary) = 2
(*temporary) = 64
(*temporary) = "Givre"
(*temporary) = "attempt to index upvalue 'weighting' (a nil value)"
weighting = nil
weapons = nil
AlexFolland commented 3 years ago

AutoGear doesn't work in French currently. Sorry. It's reading the tooltip, seeing spec "Givre", and that spec isn't in the mage spec list, which isn't localized. We haven't had the motivation to handle non-English languages. You're free to translate the spec names in your local copy to French to make it work though.

xan2622 commented 3 years ago

Hi. Thank you for these explanations. I am a bit sad your addon doesn't support other languages (but I guess it's similar for the majority of addons).

I hope that one day you could find this "motivation" :) Or, in the meanwhile, the will to add a check in the code (an exception handler) if the locale is different than 'english'.

Thank you.

AlexFolland commented 1 year ago

A localization system has been implemented in the addon, so it's now possible to localize these spec names. That being said, I didn't write the implementation myself, so I'm not sure at this moment exactly how it should be done, but I'm commenting this in case someone would like to get started on it.