Beispiel #1
0
        internal void RemoveBot(int VirtualId, bool Kicked)
        {
            RoomUser User = GetRoomUserByVirtualId(VirtualId);

            if (User == null || !User.IsBot)
            {
                return;
            }

            if (User.IsPet)
            {
                pets.Remove(User.PetData.PetId);
                petCount--;
            }

            User.BotAI.OnSelfLeaveRoom(Kicked);

            ServerMessage LeaveMessage = new ServerMessage(29);

            LeaveMessage.AppendInt32(User.VirtualId);
            room.SendMessage(LeaveMessage);

            userlist.Remove(User.InternalRoomID);
            //freeIDs[User.InternalRoomID] = null;
        }
Beispiel #2
0
        internal void RemoveItem(RoomItem item)
        {
            if (mAddedItems.ContainsKey(item.Id))
            {
                mAddedItems.Remove(item.Id);
            }

            if (mMovedItems.ContainsKey(item.Id))
            {
                mMovedItems.Remove(item.Id);
            }
            if (!mRemovedItems.ContainsKey(item.Id))
            {
                mRemovedItems.Add(item.Id, item);
            }
            mRollers.Remove(item.Id);
        }
Beispiel #3
0
        private void RemoveRoomItem(RoomItem Item)
        {
            //Logging.WriteLine("HALLO?? TRYING TO REMOVE???");
            if (Item.IsWallItem)
            {
                ServerMessage Message = new ServerMessage(Outgoing.PickUpWallItem);
                Message.AppendString(Item.Id + String.Empty);
                Message.AppendInt32(room.OwnerId);
                room.SendMessage(Message);
            }
            else if (Item.IsFloorItem)
            {
                //Logging.WriteLine("YEEEEEAH?????");
                ServerMessage Message = new ServerMessage(Outgoing.ObjectRemove);
                Message.AppendString(Item.Id + String.Empty);
                Message.AppendInt32(0);
                Message.AppendInt32(room.OwnerId);
                room.SendMessage(Message);
            }



            if (Item.IsWallItem)
            {
                mWallItems.Remove(Item.Id);
            }
            else
            {
                //Logging.WriteLine("REMOVE FLOOR Item wtf?" + mFloorItems.ContainsKey(Item.Id));
                this.mFloorItems.Remove(Item.Id);
                this.mFloorItems.OnCycle();
                room.GetGameMap().RemoveFromMap(Item);
            }

            //Logging.WriteLine("removed?? = " + mFloorItems.ContainsKey(Item.Id));
            RemoveItem(Item);

            room.GetRoomUserManager().UpdateUserStatuses();

            if (WiredHandler.TypeIsWire(Item.GetBaseItem().InteractionType))
            {
                room.GetWiredHandler().RemoveWiredItem(Item.Coordinate);
            }
        }
Beispiel #4
0
        internal void RemoveFurnitureFromTeam(RoomItem item, Team team)
        {
            switch (team)
            {
            case Team.blue:
                blueTeamItems.Remove(item.Id);
                break;

            case Team.green:
                greenTeamItems.Remove(item.Id);
                break;

            case Team.red:
                redTeamItems.Remove(item.Id);
                break;

            case Team.yellow:
                yellowTeamItems.Remove(item.Id);
                break;
            }
        }
Beispiel #5
0
        private void RemoveRoomItem(RoomItem Item)
        {
            if (Item.IsWallItem)
            {
                ServerMessage Message = new ServerMessage(84);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);
            }
            else if (Item.IsFloorItem)
            {
                ServerMessage Message = new ServerMessage(94);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);
            }



            if (Item.IsWallItem)
            {
                mWallItems.Remove(Item.Id);
            }
            else
            {
                room.GetGameMap().RemoveFromMap(Item);
                mFloorItems.Remove(Item.Id);
            }

            RemoveItem(Item);

            room.GetRoomUserManager().UpdateUserStatusses();

            if (WiredHandler.TypeIsWire(Item.GetBaseItem().InteractionType))
            {
                room.GetWiredHandler().RemoveWiredItem(Item.Coordinate);
            }
        }
Beispiel #6
0
        internal void RemoveFurnitureFromTeam(RoomItem item, Team team)
        {
            switch (team)
            {
            case Team.red:
                _redTeamItems.Remove(item.Id);
                return;

            case Team.green:
                _greenTeamItems.Remove(item.Id);
                return;

            case Team.blue:
                _blueTeamItems.Remove(item.Id);
                return;

            case Team.yellow:
                _yellowTeamItems.Remove(item.Id);
                return;

            default:
                return;
            }
        }
Beispiel #7
0
 internal void RemovePyramid(uint itemID)
 {
     banzaiPyramids.Remove(itemID);
 }
Beispiel #8
0
 internal void RemoveTeleport(uint itemID)
 {
     banzaiTeleports.Remove(itemID);
 }
Beispiel #9
0
 internal void RemovePuck(uint itemID)
 {
     pucks.Remove(itemID);
 }
Beispiel #10
0
 internal void RemoveBall(uint itemId)
 {
     _balls.Remove(itemId);
 }
Beispiel #11
0
 internal void RemoveBall(uint itemID)
 {
     balls.Remove(itemID);
 }
Beispiel #12
0
 internal void RemovePuck(uint itemId)
 {
     _pucks.Remove(itemId);
 }
Beispiel #13
0
 /// <summary>
 ///     Removes the teleport.
 /// </summary>
 /// <param name="itemId">The item identifier.</param>
 internal void RemoveTeleport(uint itemId)
 {
     _banzaiTeleports.Remove(itemId);
 }