예제 #1
0
    public bool AddItemStack(ItemStack itemStack)
    {
        if (itemStack == null)
        {
            return(true);
        }
        ItemStack currentStack = items.Find(stack => stack.Item.Name == itemStack.Item.Name && stack.Quantity < ItemStack.MAX_QUANTITY);

        while (currentStack != null && itemStack != null)
        {
            currentStack.Add(ref itemStack);

            if (itemStack == null || currentStack == null)
            {
                break;
            }

            currentStack = items.Find(stack => stack.Item.Name == itemStack.Item.Name && stack.Quantity < ItemStack.MAX_QUANTITY);
        }
        if (itemStack != null && items.Count >= Capacity)
        {
            return(false);
        }
        if (itemStack != null)
        {
            //some items left but no place to put them... but them in a new stack
            items.Add(itemStack);
        }
        return(true);
    }
예제 #2
0
        internal void addItem(int itemID, int templateID, int X, int Y, int Z, int H, string Var)
        {
            CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(templateID);

            int Length = 0;
            int Width  = 0;

            if (Z == 2 || Z == 6)
            {
                Length = Template.Length;
                Width  = Template.Width;
            }
            else
            {
                Length = Template.Width;
                Width  = Template.Length;
            }

            for (int jX = X; jX < X + Width; jX++)
            {
                for (int jY = Y; jY < Y + Length; jY++)
                {
                    ItemStack Stack = _Room._sqStack[jX, jY];
                    if (Stack == null)
                    {
                        if (Template.typeID != 2 && Template.typeID != 3)
                        {
                            Stack = new ItemStack();
                            Stack.Add(itemID);
                        }
                    }
                    else
                    {
                        Stack.Add(itemID);
                    }

                    _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                    if (Template.typeID == 2 || Template.typeID == 3)
                    {
                        _Room._sqItemHeight[jX, jY] = H + Template.Height;
                        _Room._sqItemRot[jX, jY]    = Convert.ToByte(Z);
                    }
                    else
                    {
                        if (Template.typeID == 4)
                        {
                            _Room._sqItemHeight[jX, jY] = H;
                        }
                    }
                    _Room._sqStack[jX, jY] = Stack;
                }
            }
            FloorItem Item = new FloorItem(itemID, templateID, X, Y, Z, H, Var);

            _Items.Add(itemID, Item);
        }
예제 #3
0
파일: ItemManager.cs 프로젝트: jabbo/Jabbo
        internal void addItem(int itemID, int templateID, int X, int Y, int Z, int H, string Var)
        {
            CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(templateID);

            int Length = 0;
            int Width = 0;
            if (Z == 2 || Z == 6)
            {
                Length = Template.Length;
                Width = Template.Width;
            }
            else
            {
                Length = Template.Width;
                Width = Template.Length;
            }

            for (int jX = X; jX < X + Width; jX++)
                for (int jY = Y; jY < Y + Length; jY++)
                {
                    ItemStack Stack = _Room._sqStack[jX, jY];
                    if (Stack == null)
                    {
                        if (Template.typeID != 2 && Template.typeID != 3)
                        {
                            Stack = new ItemStack();
                            Stack.Add(itemID);
                        }
                    }
                    else
                        Stack.Add(itemID);

                    _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                    if (Template.typeID == 2 || Template.typeID == 3)
                    {
                        _Room._sqItemHeight[jX, jY] = H + Template.Height;
                        _Room._sqItemRot[jX, jY] = Convert.ToByte(Z);
                    }
                    else
                    {
                        if (Template.typeID == 4)
                            _Room._sqItemHeight[jX, jY] = H;
                    }
                    _Room._sqStack[jX, jY] = Stack;
                }
            FloorItem Item = new FloorItem(itemID, templateID, X, Y, Z, H, Var);
            _Items.Add(itemID, Item);
        }
예제 #4
0
    public void AddItem(ItemStack itemStack)
    {
        if (itemStack == null || itemStack.ammount == 0)
        {
            return;
        }

        ItemStack existingStack = getItemWithName(itemStack.item.name);

        if (existingStack != null)
        {
            existingStack.Add(itemStack.ammount);
        }
        else
        {
            items.Add(itemStack);
        }
    }
예제 #5
0
    public ItemStack AddItemAt(int index, ItemStack item)
    {
        if (index < 0 || index > itemSlots.Length)
        {
            throw new System.IndexOutOfRangeException();
        }
        ItemStack prevItemStack = itemSlots[index].GetItemStack();

        if (prevItemStack != null && item != null && prevItemStack.GetItem().itemData == item.GetItem().itemData)
        {
            if (prevItemStack.Add(item))
            {
                inventoryChanged.Invoke();
                return(null);
            }
        }
        itemSlots[index].SetItemStack(item);
        inventoryChanged.Invoke();
        return(prevItemStack);
    }
예제 #6
0
        public new void Swap(Container container)
        {
            var ks = Keyboard.GetState();

            if (ks.IsKeyDown(Keys.LeftControl))
            {
                if (ItemStack.IsEmpty())
                {
                    int count = Convert.ToInt32((double)container.ItemsCount / 2 + 0.1);
                    for (int i = 0; i < count; i++)
                    {
                        ItemStack.Add(container.Item);
                        container.Remove();
                    }
                    return;
                }

                if ((container.ItemStack.IsEmpty() || container.Item.ItemId == Item.ItemId) && !container.ItemStack.IsFull())
                {
                    container.ItemStack.Add(ItemStack.Item);
                    ItemStack.Remove();
                }
                return;
            }

            if (container.Item == null || Item == null || container.Item.ItemId != Item.ItemId || container.ItemStack.IsFull())
            {
                container.Swap(this);
                return;
            }

            var itemsCount = ItemsCount;

            for (var i = 0; i < itemsCount && !container.ItemStack.IsFull(); i++)
            {
                Remove();
                container.Add();
            }
        }
예제 #7
0
        internal void placeItem(int itemID, int templateID, int X, int Y, byte typeID, byte Z)
        {
            if (_Items.ContainsKey(itemID))
            {
                return;
            }

            try
            {
                CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(templateID);

                int Length = 0;
                int Width  = 0;
                if (Z == 2 || Z == 6)
                {
                    Length = Template.Length;
                    Width  = Template.Width;
                }
                else
                {
                    Length = Template.Width;
                    Width  = Template.Length;
                }

                int testH = _Room._sqHeight[X, Y];
                int H     = testH;
                if (_Room._sqStack[X, Y] != null)
                {
                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[X, Y].topItemID()];
                    H = topItem.H + CatalogueManager.getTemplate(topItem.TypeDBID).Height;
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        if (_Room._sqUnit[jX, jY])
                        {
                            return;
                        }

                        Room.squareState jState = _Room._sqState[jX, jY];
                        if (jState != Room.squareState.Open)
                        {
                            if (jState == Room.squareState.Blocked)
                            {
                                if (_Room._sqStack[jX, jY] == null)
                                {
                                    return;
                                }
                                else
                                {
                                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[jX, jY].topItemID()];
                                    CatalogueManager.itemTemplate topItemTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                                    if (topItemTemplate.Height == 0 || topItemTemplate.typeID == 2 || topItemTemplate.typeID == 3) // No stacking on seat/bed
                                    {
                                        return;
                                    }
                                    else
                                    {
                                        if (topItem.H + topItemTemplate.Height > H)
                                        {
                                            H = topItem.H + topItemTemplate.Height;
                                        }
                                    }
                                }
                            }
                            else
                            {
                                return;
                            }
                        }
                    }
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        ItemStack Stack = null;
                        if (_Room._sqStack[jX, jY] == null)
                        {
                            if ((Template.typeID == 1 && Template.Height > 0) || Template.typeID == 4)
                            {
                                Stack = new ItemStack();
                                Stack.Add(itemID);
                            }
                        }
                        else
                        {
                            Stack = _Room._sqStack[jX, jY];
                            Stack.Add(itemID);
                        }

                        _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                        _Room._sqStack[jX, jY] = Stack;
                        if (Template.typeID == 2 || Template.typeID == 3)
                        {
                            _Room._sqItemHeight[jX, jY] = H + Template.Height;
                            _Room._sqItemRot[jX, jY]    = Z;
                        }
                        else if (Template.typeID == 4)
                        {
                            _Room._sqItemHeight[jX, jY] = H;
                        }
                    }
                }

                MySQL.runQuery("UPDATE items SET room = '" + _Room.RoomID + "',tile = '" + X + "_" + Y + "',h = '" + Z + "' WHERE id = '" + itemID + "' LIMIT 1");
                FloorItem Item = new FloorItem(itemID, templateID, X, Y, Z, H, "");
                _Items.Add(itemID, Item);
                _Room.sendData("A]" + Item.ToString());
            }
            catch { }
        }
예제 #8
0
        internal void relocateItem(int itemID, int X, int Y, byte Z)
        {
            try
            {
                FloorItem Item = (FloorItem)_Items[itemID];
                CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(Item.TypeDBID);

                int Length = 0;
                int Width  = 0;
                if (Z == 2 || Z == 6)
                {
                    Length = Template.Length;
                    Width  = Template.Width;
                }
                else
                {
                    Length = Template.Width;
                    Width  = Template.Length;
                }

                int baseFloorH = _Room._sqHeight[X, Y];
                int H          = baseFloorH;
                if (_Room._sqStack[X, Y] != null)
                {
                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[X, Y].topItemID()];
                    if (topItem != Item)
                    {
                        CatalogueManager.itemTemplate topTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                        if (topTemplate.typeID == 1)
                        {
                            H = topItem.H + topTemplate.Height;
                        }
                    }
                    else if (_Room._sqStack[X, Y].Count > 1)
                    {
                        H = topItem.H;
                    }
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        if (Template.typeID != 2 && _Room._sqUnit[jX, jY])
                        {
                            return;
                        }

                        Room.squareState jState = _Room._sqState[jX, jY];
                        ItemStack        Stack  = _Room._sqStack[jX, jY];
                        if (jState != Room.squareState.Open)
                        {
                            if (Stack == null)
                            {
                                if (jX != Item.X || jY != Item.Y)
                                {
                                    return;
                                }
                            }
                            else
                            {
                                FloorItem topItem = (FloorItem)_Items[Stack.topItemID()];
                                if (topItem != Item)
                                {
                                    CatalogueManager.itemTemplate topItemTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                                    if (topItemTemplate.typeID == 1 && topItemTemplate.Height > 0)
                                    {
                                        if (topItem.H + topItemTemplate.Height > H)
                                        {
                                            H = topItem.H + topItemTemplate.Height;
                                        }
                                    }
                                    else
                                    {
                                        if (topItemTemplate.typeID == 2)
                                        {
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                int oldLength = 1;
                int oldWidth  = 1;

                if (Template.Length > 1 || Template.Width > 1)
                {
                    if (Item.Z == 2 || Item.Z == 6)
                    {
                        oldLength = Template.Length;
                        oldWidth  = Template.Width;
                    }
                    else
                    {
                        oldLength = Template.Width;
                        oldWidth  = Template.Length;
                    }
                }

                for (int jX = Item.X; jX < Item.X + oldWidth; jX++)
                {
                    for (int jY = Item.Y; jY < Item.Y + oldLength; jY++)
                    {
                        ItemStack Stack = _Room._sqStack[jX, jY];
                        if (Stack != null && Stack.Count > 1)
                        {
                            if (itemID == Stack.bottomItemID())
                            {
                                if (CatalogueManager.getTemplate(((FloorItem)_Items[Stack.topItemID()]).TypeDBID).typeID == 2)
                                {
                                    _Room._sqState[jX, jY] = Room.squareState.Seat;
                                }
                                else
                                {
                                    _Room._sqState[jX, jY] = Room.squareState.Open;
                                }
                            }
                            else if (itemID == Stack.topItemID())
                            {
                                FloorItem belowItem = (FloorItem)_Items[Stack.getBelowItemID(itemID)];
                                int       typeID    = CatalogueManager.getTemplate(belowItem.TypeDBID).typeID;

                                _Room._sqState[jX, jY] = (Room.squareState)typeID;
                                if (typeID == 2 || typeID == 3)
                                {
                                    _Room._sqItemRot[jX, jY]    = (byte)belowItem.Z;
                                    _Room._sqItemHeight[jX, jY] = belowItem.H + CatalogueManager.getTemplate(belowItem.TypeDBID).Height;
                                }
                                else if (typeID == 4)
                                {
                                    _Room._sqItemHeight[jX, jY] = belowItem.H;
                                }
                            }
                            Stack.Remove(itemID);
                            _Room._sqStack[jX, jY] = Stack;
                        }
                        else
                        {
                            _Room._sqState[jX, jY]      = 0;
                            _Room._sqItemHeight[jX, jY] = 0;
                            _Room._sqItemRot[jX, jY]    = 0;
                            _Room._sqStack[jX, jY]      = null;
                        }
                        if (Template.typeID == 2 || Template.typeID == 3)
                        {
                            _Room.refreshCoord(jX, jY);
                        }
                    }
                }

                Item.X = X;
                Item.Y = Y;
                Item.Z = Z;
                Item.H = H;
                //_Room.sendData("A_" + Item.ToString());
                //DB.runQuery("UPDATE furniture SET x = '" + X + "',y = '" + Y + "',z = '" + Z + "',h = '" + H.ToString().Replace(',', '.') + "' WHERE id = '" + itemID + "' LIMIT 1");

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        ItemStack Stack = null;
                        if (_Room._sqStack[jX, jY] == null)
                        {
                            if (Template.Height > 0 && Template.typeID != 2 && Template.typeID != 3 && Template.typeID != 4)
                            {
                                Stack = new ItemStack();
                                Stack.Add(itemID);
                            }
                        }
                        else
                        {
                            Stack = _Room._sqStack[jX, jY];
                            Stack.Add(itemID);
                        }

                        _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                        _Room._sqStack[jX, jY] = Stack;
                        if (Template.typeID == 2 || Template.typeID == 3)
                        {
                            _Room._sqItemHeight[jX, jY] = H + Template.Height;
                            _Room._sqItemRot[jX, jY]    = Z;
                            _Room.refreshCoord(jX, jY);
                        }
                        else if (Template.typeID == 4)
                        {
                            _Room._sqItemHeight[jX, jY] = H;
                        }
                    }
                }
            }
            catch { }
        }
예제 #9
0
파일: ItemManager.cs 프로젝트: jabbo/Jabbo
        internal void placeItem(int itemID, int templateID, int X, int Y, byte typeID, byte Z)
        {
            if (_Items.ContainsKey(itemID))
                return;

            try
            {
                CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(templateID);

                int Length = 0;
                int Width = 0;
                if (Z == 2 || Z == 6)
                {
                    Length = Template.Length;
                    Width = Template.Width;
                }
                else
                {
                    Length = Template.Width;
                    Width = Template.Length;
                }

                int testH = _Room._sqHeight[X, Y];
                int H = testH;
                if (_Room._sqStack[X, Y] != null)
                {
                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[X, Y].topItemID()];
                    H = topItem.H + CatalogueManager.getTemplate(topItem.TypeDBID).Height;
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        if (_Room._sqUnit[jX, jY])
                            return;

                        Room.squareState jState = _Room._sqState[jX, jY];
                        if (jState != Room.squareState.Open)
                        {
                            if (jState == Room.squareState.Blocked)
                            {
                                if (_Room._sqStack[jX, jY] == null)
                                    return;
                                else
                                {
                                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[jX, jY].topItemID()];
                                    CatalogueManager.itemTemplate topItemTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                                    if (topItemTemplate.Height == 0 || topItemTemplate.typeID == 2 || topItemTemplate.typeID == 3) // No stacking on seat/bed
                                        return;
                                    else
                                    {
                                        if (topItem.H + topItemTemplate.Height > H)
                                            H = topItem.H + topItemTemplate.Height;
                                    }
                                }
                            }
                            else
                                return;
                        }
                    }
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        ItemStack Stack = null;
                        if (_Room._sqStack[jX, jY] == null)
                        {
                            if ((Template.typeID == 1 && Template.Height > 0) || Template.typeID == 4)
                            {
                                Stack = new ItemStack();
                                Stack.Add(itemID);
                            }
                        }
                        else
                        {
                            Stack = _Room._sqStack[jX, jY];
                            Stack.Add(itemID);
                        }

                        _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                        _Room._sqStack[jX, jY] = Stack;
                        if (Template.typeID == 2 || Template.typeID == 3)
                        {
                            _Room._sqItemHeight[jX, jY] = H + Template.Height;
                            _Room._sqItemRot[jX, jY] = Z;
                        }
                        else if (Template.typeID == 4)
                            _Room._sqItemHeight[jX, jY] = H;
                    }
                }

                MySQL.runQuery("UPDATE items SET room = '" + _Room.RoomID + "',tile = '" + X + "_" + Y + "',h = '" + Z + "' WHERE id = '" + itemID + "' LIMIT 1");
                FloorItem Item = new FloorItem(itemID, templateID, X, Y, Z, H, "");
                _Items.Add(itemID, Item);
                _Room.sendData("A]" + Item.ToString());
            }
            catch { }
        }
예제 #10
0
파일: ItemManager.cs 프로젝트: jabbo/Jabbo
        internal void relocateItem(int itemID, int X, int Y, byte Z)
        {
            try
            {
                FloorItem Item = (FloorItem)_Items[itemID];
                CatalogueManager.itemTemplate Template = CatalogueManager.getTemplate(Item.TypeDBID);

                int Length = 0;
                int Width = 0;
                if (Z == 2 || Z == 6)
                {
                    Length = Template.Length;
                    Width = Template.Width;
                }
                else
                {
                    Length = Template.Width;
                    Width = Template.Length;
                }

                int baseFloorH = _Room._sqHeight[X, Y];
                int H = baseFloorH;
                if (_Room._sqStack[X, Y] != null)
                {
                    FloorItem topItem = (FloorItem)_Items[_Room._sqStack[X, Y].topItemID()];
                    if (topItem != Item)
                    {
                        CatalogueManager.itemTemplate topTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                        if (topTemplate.typeID == 1)
                            H = topItem.H + topTemplate.Height;
                    }
                    else if (_Room._sqStack[X, Y].Count > 1)
                        H = topItem.H;
                }

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        if (Template.typeID != 2 && _Room._sqUnit[jX, jY])
                            return;

                        Room.squareState jState = _Room._sqState[jX, jY];
                        ItemStack Stack = _Room._sqStack[jX, jY];
                        if (jState != Room.squareState.Open)
                        {
                            if (Stack == null)
                            {
                                if (jX != Item.X || jY != Item.Y)
                                    return;
                            }
                            else
                            {
                                FloorItem topItem = (FloorItem)_Items[Stack.topItemID()];
                                if (topItem != Item)
                                {
                                    CatalogueManager.itemTemplate topItemTemplate = CatalogueManager.getTemplate(topItem.TypeDBID);
                                    if (topItemTemplate.typeID == 1 && topItemTemplate.Height > 0)
                                    {
                                        if (topItem.H + topItemTemplate.Height > H)
                                            H = topItem.H + topItemTemplate.Height;
                                    }
                                    else
                                    {
                                        if (topItemTemplate.typeID == 2)
                                            return;
                                    }
                                }
                            }
                        }
                    }
                }

                int oldLength = 1;
                int oldWidth = 1;

                if (Template.Length > 1 || Template.Width > 1)
                {
                    if (Item.Z == 2 || Item.Z == 6)
                    {
                        oldLength = Template.Length;
                        oldWidth = Template.Width;
                    }
                    else
                    {
                        oldLength = Template.Width;
                        oldWidth = Template.Length;
                    }
                }

                for (int jX = Item.X; jX < Item.X + oldWidth; jX++)
                {
                    for (int jY = Item.Y; jY < Item.Y + oldLength; jY++)
                    {
                        ItemStack Stack = _Room._sqStack[jX, jY];
                        if (Stack != null && Stack.Count > 1)
                        {
                            if (itemID == Stack.bottomItemID())
                            {
                                if (CatalogueManager.getTemplate(((FloorItem)_Items[Stack.topItemID()]).TypeDBID).typeID == 2)
                                    _Room._sqState[jX, jY] = Room.squareState.Seat;
                                else
                                    _Room._sqState[jX, jY] = Room.squareState.Open;
                            }
                            else if (itemID == Stack.topItemID())
                            {
                                FloorItem belowItem = (FloorItem)_Items[Stack.getBelowItemID(itemID)];
                                int typeID = CatalogueManager.getTemplate(belowItem.TypeDBID).typeID;

                                _Room._sqState[jX, jY] = (Room.squareState)typeID;
                                if (typeID == 2 || typeID == 3)
                                {
                                    _Room._sqItemRot[jX, jY] = (byte)belowItem.Z;
                                    _Room._sqItemHeight[jX, jY] = belowItem.H + CatalogueManager.getTemplate(belowItem.TypeDBID).Height;
                                }
                                else if (typeID == 4)
                                    _Room._sqItemHeight[jX, jY] = belowItem.H;
                            }
                            Stack.Remove(itemID);
                            _Room._sqStack[jX, jY] = Stack;
                        }
                        else
                        {
                            _Room._sqState[jX, jY] = 0;
                            _Room._sqItemHeight[jX, jY] = 0;
                            _Room._sqItemRot[jX, jY] = 0;
                            _Room._sqStack[jX, jY] = null;
                        }
                        if (Template.typeID == 2 || Template.typeID == 3)
                            _Room.refreshCoord(jX, jY);
                    }
                }

                Item.X = X;
                Item.Y = Y;
                Item.Z = Z;
                Item.H = H;
                //_Room.sendData("A_" + Item.ToString());
                //DB.runQuery("UPDATE furniture SET x = '" + X + "',y = '" + Y + "',z = '" + Z + "',h = '" + H.ToString().Replace(',', '.') + "' WHERE id = '" + itemID + "' LIMIT 1");

                for (int jX = X; jX < X + Width; jX++)
                {
                    for (int jY = Y; jY < Y + Length; jY++)
                    {
                        ItemStack Stack = null;
                        if (_Room._sqStack[jX, jY] == null)
                        {
                            if (Template.Height > 0 && Template.typeID != 2 && Template.typeID != 3 && Template.typeID != 4)
                            {
                                Stack = new ItemStack();
                                Stack.Add(itemID);
                            }
                        }
                        else
                        {
                            Stack = _Room._sqStack[jX, jY];
                            Stack.Add(itemID);
                        }

                        _Room._sqState[jX, jY] = (Room.squareState)Template.typeID;
                        _Room._sqStack[jX, jY] = Stack;
                        if (Template.typeID == 2 || Template.typeID == 3)
                        {
                            _Room._sqItemHeight[jX, jY] = H + Template.Height;
                            _Room._sqItemRot[jX, jY] = Z;
                            _Room.refreshCoord(jX, jY);
                        }
                        else if (Template.typeID == 4)
                            _Room._sqItemHeight[jX, jY] = H;
                    }
                }
            }
            catch { }
        }
예제 #11
0
 public void Add(Item item = null)
 {
     ItemStack.Add(item);
     item?.Pick();
 }