Esempio n. 1
0
        public void CheckQuest()
        {
            List <DamageStore> rights = GetLootingRights( );

            ArrayList mobile = new ArrayList();

            for (int i = rights.Count - 1; i >= 0; --i)
            {
                DamageStore ds = (DamageStore)rights[i];

                if (ds.m_HasRight)
                {
                    if (ds.m_Mobile is PlayerMobile)
                    {
                        PlayerMobile pm = (PlayerMobile)ds.m_Mobile;
                        QuestSystem  qs = pm.Quest;
                        if (qs is TheGraveDiggerQuest)
                        {
                            mobile.Add(ds.m_Mobile);
                        }
                    }
                }
            }

            for (int i = 0; i < mobile.Count; ++i)
            {
                PlayerMobile pm = (PlayerMobile)mobile[i % mobile.Count];
                QuestSystem  qs = pm.Quest;

                QuestObjective obj = qs.FindObjective(typeof(FindAsianOilObjective));

                if (obj != null && !obj.Completed)
                {
                    Item oil = new AsianOil();

                    if (!pm.PlaceInBackpack(oil))
                    {
                        oil.Delete();
                        pm.SendLocalizedMessage(1046260);                           // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                    }
                    else
                    {
                        obj.Complete();
                        pm.SendMessage("你從小泉的屍體上獲得了亞洲神油.");
                    }
                }
            }
        }
Esempio n. 2
0
		public void CheckQuest()
		{
			List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );

			ArrayList mobile = new ArrayList();

			for ( int i = rights.Count - 1; i >= 0; --i )
			{
				DamageStore ds = rights[i];

				if ( ds.m_HasRight )
				{
					if ( ds.m_Mobile is PlayerMobile )
					{
						PlayerMobile pm = (PlayerMobile)ds.m_Mobile;
						QuestSystem qs = pm.Quest;
						if ( qs is TheGraveDiggerQuest )
						{
							mobile.Add( ds.m_Mobile );
						}
					}
				}
			}

			for ( int i = 0; i < mobile.Count; ++i )
			{
				PlayerMobile pm = (PlayerMobile)mobile[i % mobile.Count];
				QuestSystem qs = pm.Quest;

				QuestObjective obj = qs.FindObjective( typeof( FindAsianOilObjective ) );

				if ( obj != null && !obj.Completed )
				{
					Item oil = new AsianOil();

					if ( !pm.PlaceInBackpack( oil ) )
					{
						oil.Delete();
						pm.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
					}
					else
					{
						obj.Complete();
						pm.SendMessage( "You loot the oils off the ninja's corpse." );
					}
				}
			}	
		}