ServUO Version
Publish 57
Ultima Expansion
Endless Journey
This is an issue I have had for a while and it seems the method is different for different instances. I have seen how to do it in some other cases but I never really know why it works so I can't replicate the change across all the scripts.

Right now I am working with Chocolate Nutcracker and I'm not sure how to do it...

choconutcracker:
        public override int LabelNumber
        {
            get
            {
                switch (Type)
                {
                    default:
                    case ChocolateType.Milk: return _Wrapped ? 1156388 : 1156391;
                    case ChocolateType.Dark: return _Wrapped ? 1156387 : 1156390;
                    case ChocolateType.White: return _Wrapped ? 1156389 : 1156392;
                }
            }
        }

Trying to make it like this... obviously this doesn't work just like it is, but not sure what to change...

chocoorc:
        public override int LabelNumber
        {
            get
            {
                switch (Type)
                {
                    default:
                    case ChocolateType.Milk: return _Wrapped ? "Milk Chocolate Orc Wrapped in Foil" : "milk chocolate orc";
                    case ChocolateType.Dark: return _Wrapped ? "Dark Chocolate Orc Wrapped in Foil" : "dark chocolate orc";
                    case ChocolateType.White: return _Wrapped ? "White Chocolate Orc Wrapped in Foil" : "white chocolate orc";
                }
            }
        }

Any ideas?

Thanks in advance!

************************************

Well, ok then... this was actually easy...

chocoorc:
        public override string DefaultName
        {
            get
            {
                switch (Type)
                {
                    default:
                    case ChocolateType.Milk: return _Wrapped ? "Milk Chocolate Orc Wrapped in Foil" : "milk chocolate orc";
                    case ChocolateType.Dark: return _Wrapped ? "Dark Chocolate Orc Wrapped in Foil" : "dark chocolate orc";
                    case ChocolateType.White: return _Wrapped ? "White Chocolate Orc Wrapped in Foil" : "white chocolate orc";
                }
            }
        }

Actually found an older post by Voxspire explaining it. Thanks again @Voxpire You saved my sanity once again!
 
Last edited:
Back