wurstscript / WurstStdlib2

WurstScript Standard Library Version 2
Apache License 2.0
55 stars 53 forks source link

Wrong AbilityId in standard library for itemArmorBonus ('AIde' does not exist) #395

Open Khornefl4ke5 opened 3 years ago

Khornefl4ke5 commented 3 years ago

Looks like I stumbled across a typing error in the standard library: "_build > dependencies\wurstStdlib2 > wurst > _wurst > assets > AbilityIds.wurst".

The ability id for itemArmorBonus 'AIde' does not exist in warcraft 3. It probably should be one of these: 'AId0' to 'AId5', 'AId7' or 'AId8'

Also: The public class AbilityDefinitionAIde in "_build > dependencies\wurstStdlib2 > wurst > objediting > AbilityObjEditing.wurst" should be renamed to AbilityDefinitionArmorBonus or AbilityDefinitionDefenceBonus to match with AbilityDefinitionAttackBonus (or just add a new class, but I don't think anybody uses the old class [it doesn't work because of the above typo]).

Frotty commented 3 years ago

Thanks for the report 👍

These values are extracted from the game's slk files, there can be some issues there, yea.

These are the mentioned files, if you want feel free to propose changes:

https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_wurst/assets/AbilityIds.wurst

https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/objediting/AbilityObjEditing.wurst

Khornefl4ke5 commented 3 years ago

I also noticed naming inconsistencies while I was working on a change to propose, mainly for the group of wc3 abilities "Item Damage Bonus (+X)" and "Item Armor Bonus (+Y)". Names of static constants range from "itemDamageBonus" over "attackBonusPlus1" to "attackBonusAItc".

But changing these to make it less confusing would probably mess up some older map projects.

Frotty commented 3 years ago

To keep compat you can simply keep the old class name and make it extend the corrected name.

Frotty commented 2 years ago

Did you do any work on this?

Khornefl4ke5 commented 2 years ago

No, not yet. I didn't work on it or my wc3 project much since then. I probably find more time for it from December or January on :)

Frotty commented 1 year ago

Any update?