Ejemplo n.º 1
0
        protected override void OnAfterDeath( Items.Container c )
        {
            base.OnAfterDeath( c );

            if ( 0.2 > Utility.RandomDouble() )
                c.DropItem( new ReflectiveWolfEye() );
        }
Ejemplo n.º 2
0
        public Server()
        {
            this._settings = new Settings();
            this._items = new Items();
            this.clients = new ClientList(ref this._settings, ref this._items);
            this._listener = new Listener(ref this._settings, ref this.clients);
            this.iu = new InterfaceUpdater(ref this._settings, ref this._listener, ref this.clients, ref _items);

            this._items.Bind(ref this.clients);
        }
Ejemplo n.º 3
0
        public ClientList(ref Settings _settings, ref Items _items)
        {
            this.clientObjects = new ClientObject[_settings.ServerSize];

            this.runing = false;

            this._items = _items;

            this.worker = new Thread(new ThreadStart(Taskworker));
            this.worker.IsBackground = false;
            this.worker.Name = THREAD_NAME_WORKER;
        }
        public InterfaceUpdater(ref Settings _settings, ref Listener _listener, ref ClientList clients, ref Items auctionItems)
        {
            this.runnig = false;
            this.updateing = false;

            this._settings = _settings;
            this._listener = _listener;
            this.clients = clients;
            this.auctionItems = auctionItems;

            this.task = new Thread(new ThreadStart(Task));
            this.task.Name = THREAD_NAME;

            Console.Title = CONSOLE_TITLE + " - " + this._settings.ServerIP;
        }
Ejemplo n.º 5
0
 public AuctionHouse()
 {
     Items i1 = new Items();
     i1.Vurdering = 300;
     i1.Type = "Stol";
     Items i2 = new Items();
     i2.Vurdering = 250;
     i2.Type = "Computer";
     Items i3 = new Items();
     i3.Vurdering = 100;
     i3.Type = "N64 MarioKart";
     AddItem(i1);
     AddItem(i2);
     AddItem(i3);
 }
Ejemplo n.º 6
0
		public bool Equip( Item i, Items.Slots s )
		{
			if ( Items[ (int)s ] == null )
			{
				//i.Equip( this, s );
				Items[ (int)s ] = i;				
				return true;
			}
			return false;
		}
Ejemplo n.º 7
0
 public override void OnCarve(Mobile from, Items.Corpse corpse, Item with)
 {
     if (!corpse.Carved)
         base.OnCarve(from, corpse, with);
 }
Ejemplo n.º 8
0
 public void AddItem(Items item)
 {
     id++;
     item.Id = id;
     itemList.Add(item);
 }
Ejemplo n.º 9
0
		public GuardPost(Items.KinGuardPost gp)
		{
			if (gp == null || gp.Deleted) return;
			Owner = new Player(gp.Owner);
			Silver = gp.Silver;
			FightMode = (int)gp.FightMode;
			HireSpeed = (int)gp.HireSpeed;
			GuardType = gp.CreaturesName.Count > 0 ? gp.CreaturesName[0].ToString() : string.Empty;
		}
Ejemplo n.º 10
0
 /// <summary>
 /// Pobiera konto z bazy danych, o podanym loginie.
 /// </summary>
 /// <param name="login">Login konta</param>
 /// <returns>Konto z bazy danych</returns>
 public Account GetAccount(string login)
 {
     return(Items.Find(x => x.Login == login));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Sprawdza, czy konto o podanym loginie istnieje w bazie danych.
 /// </summary>
 /// <param name="login">Login konta</param>
 /// <returns></returns>
 public bool IsExists(string login)
 {
     return(Items.Find(x => x.Login == login) != null);
 }