Beispiel #1
0
        public void RemoveFurniture(GameClient session, int id)
        {
            Item Item = GetItem(id);

            if (Item == null)
            {
                return;
            }

            if (Item.GetBaseItem().InteractionType == InteractionType.FOOTBALL_GATE)
            {
                _room.GetSoccer().UnRegisterGate(Item);
            }

            if (Item.GetBaseItem().InteractionType != InteractionType.GIFT)
            {
                Item.Interactor.OnRemove(session, Item);
            }

            if (Item.GetBaseItem().InteractionType == InteractionType.GUILD_GATE)
            {
                Item.UpdateCounter = 0;
                Item.UpdateNeeded  = false;
            }

            RemoveRoomItem(Item);
        }
Beispiel #2
0
        public void RemoveFurniture(GameClient Session, int pId, bool WasPicked = true)
        {
            Item Item = GetItem(pId);

            if (Item == null)
            {
                return;
            }

            if (Item.GetBaseItem().InteractionType == InteractionType.FOOTBALL_GATE)
            {
                _room.GetSoccer().UnRegisterGate(Item);
            }

            if (Item.GetBaseItem().InteractionType != InteractionType.GIFT)
            {
                Item.Interactor.OnRemove(Session, Item);
            }

            if (Item.GetBaseItem().ItemName.ToLower() == "olympics_c16_treadmill" || Item.GetBaseItem().ItemName.ToLower() == "olympics_c16_crosstrainer" || Item.GetBaseItem().InteractionType == InteractionType.GUILD_GATE || Item.GetBaseItem().InteractionType == InteractionType.SLIDING_DOORS || Item.GetBaseItem().InteractionType == InteractionType.SHOWER || Item.GetBaseItem().InteractionType == InteractionType.TRASH_CAN)
            {
                Item.UpdateCounter = 0;
                Item.UpdateNeeded  = false;
            }

            RemoveRoomItem(Item);
        }
Beispiel #3
0
        public void RemoveFurniture(GameClient Session, int pId, bool WasPicked = true)
        {
            var Item = GetItem(pId);

            if (Item == null)
            {
                return;
            }

            if (Item.GetBaseItem().InteractionType == InteractionType.FootballGate)
            {
                _room.GetSoccer().UnRegisterGate(Item);
            }
            if (Item.GetBaseItem().InteractionType != InteractionType.Gift)
            {
                Item.Interactor.OnRemove(Session, Item);
            }
            if (Item.GetBaseItem().InteractionType == InteractionType.GuildGate)
            {
                Item.UpdateCounter = 0;
                Item.UpdateNeeded  = false;
            }
            RemoveRoomItem(Item);
        }
Beispiel #4
0
        private void AddSpecialItems(Item item)
        {
            switch (item.GetBaseItem().InteractionType)
            {
            case InteractionType.FootballGate:

                //IsTrans = true;
                _room.GetSoccer().RegisterGate(item);
                var splittedExtraData = item.ExtraData.Split(':');
                if (string.IsNullOrEmpty(item.ExtraData) || splittedExtraData.Length <= 1)
                {
                    item.Gender = "M";
                    switch (item.Team)
                    {
                    case TEAM.YELLOW:
                        item.Figure = "lg-275-93.hr-115-61.hd-207-14.ch-265-93.sh-305-62";
                        break;

                    case TEAM.RED:
                        item.Figure = "lg-275-96.hr-115-61.hd-180-3.ch-265-96.sh-305-62";
                        break;

                    case TEAM.GREEN:
                        item.Figure = "lg-275-102.hr-115-61.hd-180-3.ch-265-102.sh-305-62";
                        break;

                    case TEAM.BLUE:
                        item.Figure = "lg-275-108.hr-115-61.hd-180-3.ch-265-108.sh-305-62";
                        break;
                    }
                }
                else
                {
                    item.Gender = splittedExtraData[0];
                    item.Figure = splittedExtraData[1];
                }

                break;

            case InteractionType.Banzaifloor:
            {
                _room.GetBanzai().AddTile(item, item.Id);
                break;
            }

            case InteractionType.Banzaipyramid:
            {
                _room.GetGameItemHandler().AddPyramid(item, item.Id);
                break;
            }

            case InteractionType.Banzaitele:
            {
                _room.GetGameItemHandler().AddTeleport(item, item.Id);
                item.ExtraData = "";
                break;
            }

            case InteractionType.Banzaipuck:
            {
                _room.GetBanzai().AddPuck(item);
                break;
            }

            case InteractionType.Football:
            {
                _room.GetSoccer().AddBall(item);
                break;
            }

            case InteractionType.FreezeTileBlock:
            {
                _room.GetFreeze().AddFreezeBlock(item);
                break;
            }

            case InteractionType.FreezeTile:
            {
                _room.GetFreeze().AddFreezeTile(item);
                break;
            }

            case InteractionType.Freezeexit:
            {
                _room.GetFreeze().AddExitTile(item);
                break;
            }
            }
        }
Beispiel #5
0
        private void AddSpecialItems(Item item)
        {
            switch (item.GetBaseItem().InteractionType)
            {
            case InteractionType.FOOTBALL_GATE:
                //IsTrans = true;
                _room.GetSoccer().RegisterGate(item);


                string[] splittedExtraData = item.ExtraData.Split(':');

                if (string.IsNullOrEmpty(item.ExtraData) || splittedExtraData.Length <= 1)
                {
                    item.Gender = "M";
                    switch (item.team)
                    {
                    case Team.Yellow:
                        item.Figure = "lg-275-93.hr-115-61.hd-207-14.ch-265-93.sh-305-62";
                        break;

                    case Team.Red:
                        item.Figure = "lg-275-96.hr-115-61.hd-180-3.ch-265-96.sh-305-62";
                        break;

                    case Team.Green:
                        item.Figure = "lg-275-102.hr-115-61.hd-180-3.ch-265-102.sh-305-62";
                        break;

                    case Team.Blue:
                        item.Figure = "lg-275-108.hr-115-61.hd-180-3.ch-265-108.sh-305-62";
                        break;
                    }
                }
                else
                {
                    item.Gender = splittedExtraData[0];
                    item.Figure = splittedExtraData[1];
                }
                break;

            case InteractionType.banzaifloor:
            {
                _room.GetBanzai().AddTile(item, item.Id);
                break;
            }

            case InteractionType.banzaipyramid:
            {
                _room.GetGameItemHandler().AddPyramid(item, item.Id);
                break;
            }

            case InteractionType.banzaitele:
            {
                _room.GetGameItemHandler().AddTeleport(item, item.Id);
                item.ExtraData = "";
                break;
            }

            case InteractionType.banzaipuck:
            {
                _room.GetBanzai().AddPuck(item);
                break;
            }

            case InteractionType.FOOTBALL:
            {
                _room.GetSoccer().AddBall(item);
                break;
            }

            case InteractionType.FREEZE_TILE_BLOCK:
            {
                _room.GetFreeze().AddFreezeBlock(item);
                break;
            }

            case InteractionType.FREEZE_TILE:
            {
                _room.GetFreeze().AddFreezeTile(item);
                break;
            }

            case InteractionType.freezeexit:
            {
                _room.GetFreeze().AddExitTile(item);
                break;
            }
            }
        }