當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobile.AddItem方法代碼示例

本文整理匯總了C#中Server.Mobile.AddItem方法的典型用法代碼示例。如果您正苦於以下問題:C# Mobile.AddItem方法的具體用法?C# Mobile.AddItem怎麽用?C# Mobile.AddItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.AddItem方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddBackpack

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			//PackItem( new Gold( 1000 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			PackItem( new Spellbook( UInt64.MaxValue ) );
			
			Account account = (Account)m.Account;
				if(account.GetTag("AlreadyGotTheirGold") == null)
			{
				PackItem( new StatBall() );
				PackItem( new SkillBall() );
				PackItem( new BankCheck( 100000 ) );
				account.SetTag("AlreadyGotTheirGold", "True");
			}
			
		}
開發者ID:greeduomacro,項目名稱:GoUO,代碼行數:28,代碼來源:CharacterCreation.cs

示例2: AddBackpack

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			PackItem( new Gold( 100 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			PackItem( new BankCheck (900) );
			PackItem( new Runebook(10) );
			PackItem( new TrashPack() );
			PackItem( new SkillBall() );
			PackItem( new CorpseWand() );
			PackItem( new SkillBall() );
			PackItem( new PetLeash() );
			PackItem( new ResourceStorageKeyBlackSmith() );
			PackItem( new ResourceStorageKeyScribersTome() );
			PackItem( new ResourceStorageKeySpellCasters() );
			PackItem( new ResourceStorageKeyTailor() );
			PackItem( new NewPlayerPackage() );
			PackItem( new StatSkillPurchaseCrystal() );
			PackItem( new NewPlayerWelcomeHandbook() );
			//PackItem( new ResourceStorageKeyWood() );


		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:34,代碼來源:CharacterCreation.cs

示例3: AddBackpack

        private static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            PlayerMobile pm = m as PlayerMobile;

            pm.RawStr = 10;
            pm.AvatarID = 1076;
            pm.RawDex = 10;
            pm.RawInt = 10;
            pm.MaxHits = 10;
            pm.MaxStam = 10;
            pm.MaxMana = 10;
            pm.Hits = 10;
            pm.Stam = 10;
            pm.Mana = 10;
            pm.Criminal = true;

            if ( pack == null )
            {
                pack = new ArmourBackpack();
                pack.Movable = false;

                m.AddItem( pack );
            }

            PackItem( new RedBook( "a book", m.Name, 20, true ) );
            PackItem( new Copper( Utility.Random( 75, 150 ) ) ); // Starting gold can be customized here
            PackItem( new Dagger() );
            PackItem( new Candle() );
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:31,代碼來源:CharacterCreation.cs

示例4: AddBackpack

		//private static void AddBankbox2( Mobile m )
		//{
		//	BankBox2 box = m.Bankbox2;
//
//			if ( box == null )
//			{
//				box = new Bankbox2();
//				box.Movable = false;
//
//				
//			}
//
//		}
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
			Container cont;
			cont = new WoodenBox();
			cont.ItemID = 0xE7D;
			cont.Hue = 0x489;
			PlaceItemIn( cont, 16, 51, new NLeatherGorget() );
			PlaceItemIn( cont, 28, 51, new NLeatherArms() );
			PlaceItemIn( cont, 40, 51, new NLeatherGloves() );
			PlaceItemIn( cont, 52, 51, new NLeatherLegs() );
			
			PlaceItemIn( cont, 64, 115, new TokenLedger() );
			
 			PlaceItemIn( cont, 16, 115, new Candle() );
			PlaceItemIn( pack, 18, 169, cont );
			PlaceItemIn( pack, 16, 51, new SkillBall() );
			PlaceItemIn( pack, 56, 51, new SkillBall() );
			PlaceItemIn( pack, 66, 51, new SkillBall() );
			PlaceItemIn( pack, 80, 51, new StatBall() );
			PlaceItemIn( pack, 70, 169, new RuleBook1() );
			PlaceItemIn( pack, 164, 169, new BankCheck(  5000 ) );
			PlaceItemIn( pack, 164, 51, new CommandBook() );
		}
開發者ID:FreeReign,項目名稱:realmofdarkness,代碼行數:45,代碼來源:CharacterCreation.cs

示例5: PackItem

		public static void PackItem(Mobile m, Item item)
		{
			Container pack = m.Backpack;

			if (pack == null)
			{	// add a pack
				pack = new Backpack();
				pack.Movable = false;
				m.AddItem(pack);
			}

			if (!item.Stackable || !pack.TryDropItem(m, item, false)) // try stack
				pack.DropItem(item); // failed, drop it anyway
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:14,代碼來源:KinAwards.cs

示例6: AddBackpack

        public static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            if ( pack == null )
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem( pack );
            }

            PackItem( new Dagger() );
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:14,代碼來源:CharacterCreation.cs

示例7: AddBackpack

        private static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            if ( pack == null )
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem( pack );
            }

            PackItem( new Gold( 1000 ) ); // Starting gold can be customized here
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:14,代碼來源:CharacterCreation.cs

示例8: AddBackpack

        private static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            if ( pack == null )
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem( pack );
            }

            PackItem( new RedBook( "a book", m.Name, 20, true ) );
            PackItem( new Gold( 1000 ) ); // Starting gold can be customized here
            PackItem( new Dagger() );
            PackItem( new Candle() );
        }
開發者ID:svvota,項目名稱:runuo,代碼行數:17,代碼來源:CharacterCreation.cs

示例9: AddBackpack

        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;

            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }

            PackItem(new Gold(2000)); // Starting gold can be customized here
            PackItem(MakeNewbie(new Dagger()));

            PackItem(new Spellbook((ulong)18446744073709551615)); //fullbook
            PackItem(new BagOfReagents(50));
        }
開發者ID:greeduomacro,項目名稱:DimensionsNewAge,代碼行數:18,代碼來源:CharacterCreation.cs

示例10: OnAdded

		public override void OnAdded( object parent )
		{
			if (m_Hat != null)
			{
				m_Hat.Delete();
				m_Hat = null;
			}

			if (RootParent is Mobile)
			{
				m_Hat = new WizardsHat();
				m_Hat.Hue = 1153;
				m_Hat.Movable = false;
				m_Hat.Name = "a white magic hat";
				m_Owner = ((Mobile)RootParent);
				m_Owner.AddItem( m_Hat );
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:18,代碼來源:FFAFlag.cs

示例11: AddHair

        public static void AddHair( Mobile m, int itemID, int hue )
        {
            Item item;

            switch ( itemID & 0x3FFF )
            {
                case 0x2044: item = new Mohawk( hue ); break;
                case 0x2045: item = new PageboyHair( hue ); break;
                case 0x2046: item = new BunsHair( hue ); break;
                case 0x2047: item = new Afro( hue ); break;
                case 0x2048: item = new ReceedingHair( hue ); break;
                case 0x2049: item = new TwoPigTails( hue ); break;
                case 0x204A: item = new KrisnaHair( hue ); break;
                case 0x203B: item = new ShortHair( hue ); break;
                case 0x203C: item = new LongHair( hue ); break;
                case 0x203D: item = new PonyTail( hue ); break;
                default: return;
            }

            m.AddItem( item );
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:21,代碼來源:CharacterCreation.cs

示例12: AddBeard

        private static void AddBeard( Mobile m, int itemID, int hue )
        {
            if ( m.Female )
                return;

            Item item;

            switch ( itemID & 0x3FFF )
            {
                case 0x203E: item = new LongBeard( hue ); break;
                case 0x203F: item = new ShortBeard( hue ); break;
                case 0x2040: item = new Goatee( hue ); break;
                case 0x2041: item = new Mustache( hue ); break;
                case 0x204B: item = new MediumShortBeard( hue ); break;
                case 0x204C: item = new MediumLongBeard( hue ); break;
                case 0x204D: item = new Vandyke( hue ); break;
                default: return;
            }

            m.AddItem( item );
        }
開發者ID:BackupTheBerlios,項目名稱:sunuo-svn,代碼行數:21,代碼來源:CharacterCreation.cs

示例13: AddBackpack

        private static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            if ( pack == null )
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem( pack );
            }

            PackItem( new RedBook( "a book", m.Name, 20, true ) );
            PackItem( new Gold( 2000 ) ); // Starting gold can be customized here
            PackItem( new Spellbook( (ulong)18446744073709551615 ) );
            PackItem( new Bandage(500) );
            PackItem( new Dagger() );
            PackItem( new Candle() );
            EquipItem( new HalfApron( Utility.RandomYellowHue() ) );
            EquipItem( new HalfApron( Utility.RandomYellowHue() ) );
        }
開發者ID:FreeReign,項目名稱:aosredux,代碼行數:21,代碼來源:CharacterCreation.cs

示例14: AddBackpack

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

            PackItem(new SkillBall());
            PackItem(new StatBall());
            PackItem(new Gold(10000));
            PackItem(new Dagger());
            PackItem(new SkillBall());
            PackItem(new SkillBall());
            PackItem(new SkillBall());
            //PackItem(new NewCharSandals());
            PackItem(new TrashBackpack());
            PackItem(new TokenBox());
			
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:24,代碼來源:CharacterCreation.cs

示例15: CopyLayer

 // copy what the possessee has equipped and wear it
  static void CopyLayer( Mobile possessed, Mobile from, Layer layer )
  {
   Item anItem = possessed.FindItemOnLayer( layer );
   if ( anItem != null )
   {
  Item myitem = new Item();
  myitem.ItemID = anItem.ItemID;
  myitem.Hue = anItem.Hue;
  myitem.Layer = layer;
     from.AddItem(myitem);
   }
  }
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:13,代碼來源:pstone.cs


注:本文中的Server.Mobile.AddItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。