예제 #1
0
        public BODProps(PlayerMobile pm)
        {
            Player = pm;

            var context = BulkOrderSystem.GetContext(pm, false);

            if (context != null)
            {
                foreach (var kvp in context.Entries)
                {
                    switch (kvp.Key)
                    {
                    case BODType.Smith: Smithy = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Tailor: Tailor = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Alchemy: Alchemy = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Inscription: Inscription = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Tinkering: Tinkering = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Cooking: Cooking = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Fletching: Fletching = new BODData(kvp.Key, kvp.Value); break;

                    case BODType.Carpentry: Carpentry = new BODData(kvp.Key, kvp.Value); break;
                    }
                }
            }
        }
예제 #2
0
        public void CheckChanges()
        {
            var context = BulkOrderSystem.GetContext(Player, false);

            if (context != null)
            {
                foreach (var kvp in context.Entries)
                {
                    switch (kvp.Key)
                    {
                    case BODType.Smith:
                        if (Smithy == null)
                        {
                            Smithy = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Smithy.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Tailor:
                        if (Tailor == null)
                        {
                            Tailor = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Tailor.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Alchemy:
                        if (Alchemy == null)
                        {
                            Alchemy = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Alchemy.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Inscription:
                        if (Inscription == null)
                        {
                            Inscription = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Inscription.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Tinkering:
                        if (Tinkering == null)
                        {
                            Tinkering = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Tinkering.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Cooking:
                        if (Cooking == null)
                        {
                            Cooking = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Cooking.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Fletching:
                        if (Fletching == null)
                        {
                            Fletching = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Fletching.CheckChanges(kvp.Value);
                        }
                        break;

                    case BODType.Carpentry:
                        if (Carpentry == null)
                        {
                            Carpentry = new BODData(kvp.Key, kvp.Value);
                        }
                        else
                        {
                            Carpentry.CheckChanges(kvp.Value);
                        }
                        break;
                    }
                }
            }
        }