示例#1
0
        //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);
        }
示例#2
0
 private static SpellItemEnchantment setStatValues(SpellItemEnchantment enchant, Item item, StatPair pair)
 {
     enchant.minAmount1 = (uint)pair.value;
     enchant.maxAmount1 = (uint)pair.value;
     return(enchant);
 }
示例#3
0
 private static SpellItemEnchantment updateStatName(SpellItemEnchantment enchant, StatPair pair, DBCReader enchantReader)
 {
     enchant.sRefName1 = (uint)enchantReader.StringTableAdd(pair.ToString());
     return(enchant);
 }
示例#4
0
 /*
  *  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]);
 }