public void cloneFrom(ItemClassInfo info) { if (info == null) { this.Name = this.ItemClass; this.MaxStack = 1; this.RequiredLevel = 1; this.SubCategory = SubCategory.NONE; this.MainCategory = MainCategory.NONE; return; } //this.ItemClass=info.ItemClass; this.SubCategory = info.SubCategory; this.MainCategory = info.MainCategory; this.RequiredLevel = info.RequiredLevel; this.ClassRestriction = info.ClassRestriction; this.Name = info.Name; this.Desc = info.Desc; if (info.Stat != null) { this.Stat = new ItemStatInfo(info.Stat); } this.MaxStack = info.MaxStack; this.Feature = info.Feature; }
public Item(DbDataReader reader, DataHelper datahelper) { this.ItemID = reader.ReadInt64("ID"); this.ItemClass = reader.ReadString("itemClass"); string time = reader.ReadString("ExpireDateTime", null); if (time != null) { this.Time = time.Split(' ')[0]; } else { this.Time = "-"; } this.Collection = reader.ReadInt32("Collection"); this.Slot = reader.ReadInt32("Slot"); this.Count = reader.ReadInt32("Count", 1); this.Color1 = reader.ReadInt32("Color1", 0); this.Color2 = reader.ReadInt32("Color2", 0); this.Color3 = reader.ReadInt32("Color3", 0); ItemClassInfo item = datahelper.getItemClassInfo(this.ItemClass); cloneFrom(item); }
public Item(ItemClassInfo info) : base(info) { }
public ItemClassInfo(ItemClassInfo info) { cloneFrom(info); }