public override object Clone() { ChestData data = new ChestData(); data.Name = chestData.Name; data.IsLocked = chestData.IsLocked; data.IsTrapped = chestData.IsTrapped; data.TextureName = chestData.TextureName; data.TrapName = chestData.TrapName; data.KeyName = chestData.KeyName; data.MinGold = chestData.MinGold; data.MaxGold = chestData.MaxGold; foreach (KeyValuePair<string, string> pair in chestData.ItemCollection) data.ItemCollection.Add(pair.Key, pair.Value); Chest chest = new Chest(data); return chest; }
public override object Clone() { ChestData data = new ChestData(); data.Name = chestData.Name; data.DifficultyLevel = chestData.DifficultyLevel; data.IsLocked = chestData.IsLocked; data.IsTrapped = chestData.IsTrapped; data.TrapName = chestData.TrapName; data.KeyName = chestData.KeyName; data.KeyType = chestData.KeyType; data.KeysRequired = chestData.KeysRequired; data.MinGold = chestData.MinGold; data.MaxGold = chestData.MaxGold; foreach (KeyValuePair<string, string> item in chestData.ItemCollection) data.ItemCollection.Add(item.Key, item.Value); Chest chest = new Chest(data); return chest; }