Esempio n. 1
0
    protected virtual void ExpandFromPrototype()
    {
        Init();
        string prototypeId = _id;

        //level 11+ are enhanced items with a unique id, their prototype values are equal to a level 10 version of itself
        bool isEnhancedItem = ItemId.IsEnhancedItemId(_id);

        if (isEnhancedItem)
        {
            prototypeId = _id.Split('_')[0] + "_10";
        }

        Item prototype = GetItem(prototypeId);

        prototype.CopyPrototypeValuesToInstance(this);
    }