//Populates spellitemenchantment.dbc with entries from stat private static List <SpellItemEnchantment> populateStat(Stat stat) { List <SpellItemEnchantment> enchants = new List <SpellItemEnchantment>(); for (int i = 0; i < enchantVariations; i++) { StatPair pair = new StatPair(stat, i, stat.dbID); SpellItemEnchantment enchant = new SpellItemEnchantment(); enchant.ID = DBCHelper.getNextEnchantEntry(); enchant.sRefName1 = (uint)enchantReader.StringTableAdd(pair.ToString()); enchant.spellDispelType1 = 5; enchant.objectId1 = (uint)stat.dbID; enchant.minAmount1 = (uint)i; enchant.maxAmount1 = (uint)i; enchant.itemCache = 16712190; enchants.Add(enchant); } return(enchants); }
private static SpellItemEnchantment setStatValues(SpellItemEnchantment enchant, Item item, StatPair pair) { enchant.minAmount1 = (uint)pair.value; enchant.maxAmount1 = (uint)pair.value; return(enchant); }
private static SpellItemEnchantment updateStatName(SpellItemEnchantment enchant, StatPair pair, DBCReader enchantReader) { enchant.sRefName1 = (uint)enchantReader.StringTableAdd(pair.ToString()); return(enchant); }
/* * So if we want enchantment for +3 Agility we pass in: enchants[Stat(agility)][3] */ public static SpellItemEnchantment get(StatPair pair) { return(enchants[pair.stat.dbID][pair.value]); }