Adding a "TwoHand" enchant allows that enchant on 1H weapons

Topics: Rawr.Mage
Mar 9, 2009 at 5:19 PM
So I'm putting any new mage-able items from the PTR (mainly using wowhead's "Latest" list for the PTR:, and wanted to add the 81 spellpower staff enchant to see how staff + huge enchant, and 1H + Offhand + smaller enchant would compare.  I added the enchant to the XML (because I don't believe there's an 'add enchant' interface of sorts in Rawr), hoping that because the enchant uses regular stats it wouldn't need specific coding like the lightweave embroidery did.  This is the XML I added:

    <Name>Greater Spellpower</Name>

I chose an arbitrary ID of '4000' because I couldn't figure out where any of the other enchants got their ID number from.  Looking at those other enchants on wowhead, whether from the recipe, or from the spell detail, none of the enchants match (These are all 4-digit id numbers, wowhead tends to use 5-digit id numbers for it's enchant "Spell" id's.).  Anyway, it appeared to work when I loaded up rawr, and showed the enchant in the comparisons chart and let me check and uncheck it for the optimizer.  The only problem, though, is that rawr doesn't appear to honor the "TwoHand" slot type.  The optimizer was sticking it on 1-handers, and I could manually put it on 1-handers.

It seems to me like the enchant code needs to be cleaned up some, it should honor both slot types *and* item types.  Right now it tends to ignore if an item is "held in offhand" and tries to put enchants on those...It shouldn't be up to each individual models to handle what *item types* enchants can be placed on.  This should be handled by the enchanting & item code.  There's also other item-type-specific enchants, like "Shield"-only enchants, and now this new "Staff"-only enchant. 

Mar 9, 2009 at 5:32 PM
What you describe is already how it works. The Mage model just hasn't been updated with restrictions about 1H vs 2H enchants.
Mar 9, 2009 at 5:36 PM
But why is it model-specific?  Enchantments are not restricted based upon class or spec, but upon the item types they can be placed on.
Mar 9, 2009 at 5:56 PM
Well, that's partly a good point. Selection of enchants needs to be model specific, but I could still enforce the requirements in the calculation of enchants. ie, only add the stats of the enchant if the enchant fits on the item.
Mar 10, 2009 at 12:56 AM
Selection of enchants is right now based on character slot only. Should we include an item slot filter on it?
Mar 10, 2009 at 1:55 AM
No, I think they should just have no value if they don't fit the item. It'd be annoying to have enchants get deselected, or not be selectable, which flipping between items.