コード例 #1
0
        protected override void OnAfterDeath( Items.Container c )
        {
            base.OnAfterDeath( c );

            if ( 0.2 > Utility.RandomDouble() )
                c.DropItem( new ReflectiveWolfEye() );
        }
コード例 #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);
        }
コード例 #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;
        }
コード例 #4
0
        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;
        }
コード例 #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);
 }
コード例 #6
0
ファイル: Character.cs プロジェクト: karliky/wowwow
		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;
		}
コード例 #7
0
ファイル: Daemon.cs プロジェクト: greeduomacro/vivre-uo
 public override void OnCarve(Mobile from, Items.Corpse corpse, Item with)
 {
     if (!corpse.Carved)
         base.OnCarve(from, corpse, with);
 }
コード例 #8
0
 public void AddItem(Items item)
 {
     id++;
     item.Id = id;
     itemList.Add(item);
 }
コード例 #9
0
ファイル: KinLogging.cs プロジェクト: zerodowned/angelisland
		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;
		}
コード例 #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));
 }
コード例 #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);
 }