コード例 #1
0
        public ItemClassInfo(DbDataReader reader, HeroesTextHelper HeroesText)
        {
            this.ItemClass        = reader.ReadString("ItemClass", "").ToLower();
            this.SubCategory      = reader.ReadEnum <SubCategory>("Category", SubCategory.NONE);
            this.MainCategory     = reader.ReadEnum <MainCategory>("TradeCategory", MainCategory.NONE);
            this.MaxStack         = reader.ReadInt64("MaxStack");
            this.RequiredLevel    = reader.ReadInt32("RequiredLevel");
            this.ClassRestriction = reader.ReadInt32("ClassRestriction");
            string tmp;

            if (HeroesText.ItemNames.TryGetValue(this.ItemClass, out tmp))
            {
                this.Name = tmp;
            }
            if (HeroesText.ItemDescs.TryGetValue(this.ItemClass, out tmp))
            {
                this.Desc = tmp;
            }

            ItemStatInfo stat = new ItemStatInfo(reader);

            if (!stat.IsEmpty())
            {
                this.Stat = stat;
            }
            this.Feature = reader.ReadString("Feature");
        }
コード例 #2
0
 public ItemStatInfo(ItemStatInfo info)
 {
     this.ATK          = info.ATK;
     this.ATK_Speed    = info.ATK_Speed;
     this.Critical     = info.Critical;
     this.Balance      = info.Balance;
     this.MATK         = info.MATK;
     this.DEF          = info.DEF;
     this.Res_Critical = info.Res_Critical;
     this.PVP_ATK      = info.PVP_ATK;
     this.PVP_MATK     = info.PVP_MATK;
     this.PVP_DEF      = info.PVP_DEF;
     this.TOWN_SPEED   = info.TOWN_SPEED;
 }