Beispiel #1
0
        public void Axis(string widget = "")

        {
            Options("Axis").Clicks();

            SelectAxis.SelectDropdown("Resources");

            AxisType.SelectDropdown("Departments");

            Characterlimit.ClearText(); Characterlimit.EnterText("10");

            if (widget == "Pareto")

            {
                ItemLimit.ClearText(); ItemLimit.EnterText("10");
            }

            else if (widget == "" || widget == "Stacked")
            {
                //ItemLimit.ClearText(); ItemLimit.EnterText("10");

                Sorting(1).Clicks();
            }


            else if (widget == "Comparison")

            {
                Sorting(1).Clicks();

                TotalLine.Clicks();

                SortingMetric.SelectIndex(2);
            }
        }
Beispiel #2
0
        void InvalidateBank(BasePlayer player, BankProfile profile, StorageContainer view)
        {
            bool returned = false;

            if (view != null && view.inventory != null && view.inventory.itemList != null)
            {
                foreach (var item in view.inventory.itemList.ToArray())
                {
                    ItemLimit limit = GetItemLimit(item);

                    if (limit != null)
                    {
                        if (item.amount < limit.minimum)
                        {
                            returned = true;
                            if (player.inventory.containerMain == null || (player.inventory.containerMain != null && !item.MoveToContainer(player.inventory.containerMain)))
                            {
                                if (player.inventory.containerBelt == null || (player.inventory.containerBelt != null && !item.MoveToContainer(player.inventory.containerBelt)))
                                {
                                    item.Drop(player.eyes.HeadForward() * 2, default(Vector3));
                                }
                            }
                            continue;
                        }

                        if (item.amount > limit.maximum)
                        {
                            returned = true;
                            Item invalidItem;

                            if (limit.maximum > 0)
                            {
                                invalidItem = item.SplitItem(item.amount - limit.maximum);
                            }
                            else
                            {
                                invalidItem = item;
                            }
                            if (invalidItem != null)
                            {
                                if (player.inventory.containerMain == null || (player.inventory.containerMain != null && !invalidItem.MoveToContainer(player.inventory.containerMain)))
                                {
                                    if (player.inventory.containerBelt == null || (player.inventory.containerBelt != null && !invalidItem.MoveToContainer(player.inventory.containerBelt)))
                                    {
                                        invalidItem.Drop(player.eyes.HeadForward() * 2, default(Vector3));
                                    }
                                }
                            }
                        }
                    }
                }
            }

            if (returned)
            {
                SendReply(player, GetMsg("Limit: Return", player));
            }
        }