public static BaseDoorTrap CreateTrapByType(DoorTrapType type, Mobile owner, int uses)
        {
            BaseDoorTrap trap = null;

            switch (type)
            {
            case DoorTrapType.Arrow:
                trap = new DoorArrowTrap(owner, uses);
                break;

            case DoorTrapType.Dart:
                trap = new DoorDartTrap(owner, uses);
                break;

            case DoorTrapType.Explosion:
                trap = new DoorExplosionTrap(owner);
                break;

            case DoorTrapType.Guillotine:
                trap = new DoorGuillotineTrap(owner);
                break;

            case DoorTrapType.Poison:
                trap = new DoorPoisonTrap(owner, uses);
                break;
            }

            return(trap);
        }
Ejemplo n.º 2
0
		public static BaseDoorTrap CreateTrapByType( DoorTrapType type, Mobile owner, int uses )
		{
			BaseDoorTrap trap = null;

			switch( type )
			{
				case DoorTrapType.Arrow:
					trap = new DoorArrowTrap( owner, uses );
					break;
				case DoorTrapType.Dart:
					trap = new DoorDartTrap( owner, uses );
					break;
				case DoorTrapType.Explosion:
					trap = new DoorExplosionTrap( owner );
					break;
				case DoorTrapType.Guillotine:
					trap = new DoorGuillotineTrap( owner );
					break;
				case DoorTrapType.Poison:
					trap = new DoorPoisonTrap( owner, uses );
					break;
			}

			return trap;
		}