Beispiel #1
0
    public override DatabaseEntry Copy()
    {
        Item item = new Item(key);


        item.itemType            = itemType;
        item.Name                = Name;
        item.descript            = descript;
        item.DisappearsInventory = DisappearsInventory;
        item.cost                = cost;
        item.maxStack            = maxStack;
        item.ChargeItem          = ChargeItem;

        if (IsEquippable())
        {
            item.equippEffect = (EquippableItem)equippEffect.Copy();
        }

        if (HasConsumableEFfect())
        {
            item.consumeableEffect = (Activateableitem)consumeableEffect.Copy();
        }

        if (HasActivationEffect())
        {
            item.activationEffect = (Activateableitem)activationEffect.Copy();
        }


        foreach (string key in validJobs)
        {
            item.validJobs.Add(key);
        }

        return(item);
    }