Ejemplo n.º 1
0
        /// <summary>
        /// Hand out an artifact.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="player"></param>
        /// <param name="artifactID"></param>
        /// <param name="itemTemplate"></param>
        protected static bool GiveItem(GameLiving source, GamePlayer player, String artifactID, ItemTemplate itemTemplate)
        {
            InventoryItem item = new InventoryArtifact(itemTemplate);

            if (!player.ReceiveItem(source, item))
            {
                player.Out.SendMessage(LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "ArtifactQuest.GiveItem.BackpackFull"), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// Hand out an artifact.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="player"></param>
        /// <param name="artifactID"></param>
        /// <param name="itemTemplate"></param>
        protected new static bool GiveItem(GamePlayer player, ItemTemplate itemTemplate)
        {
            InventoryArtifact item = new InventoryArtifact(itemTemplate);

            if (!player.ReceiveItem(null, item))
            {
                player.Out.SendMessage(String.Format("Your backpack is full, please make some room and try again."), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
                return(false);
            }

            return(true);
        }
        protected void ReturnArtifact(GamePlayer player)
        {
            ItemTemplate      itemTemplate = GameServer.Database.FindObjectByKey <ItemTemplate>(GetCustomProperty("Id_nb"));
            InventoryArtifact artifact     = new InventoryArtifact(itemTemplate);

            artifact.ArtifactLevel = Convert.ToInt32(GetCustomProperty("ALevel"));
            artifact.Experience    = Convert.ToInt64(GetCustomProperty("AXP"));
            artifact.UpdateAbilities(itemTemplate);

            if (!player.ReceiveItem(null, artifact))
            {
                player.Out.SendMessage(String.Format("Your backpack is full, please make some room and try again.  You may have to relog to get to complete this quest."), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
                return;
            }

            FinishQuest();
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Hand out an artifact.
		/// </summary>
		/// <param name="source"></param>
		/// <param name="player"></param>
		/// <param name="artifactID"></param>
		/// <param name="itemTemplate"></param>
		protected new static bool GiveItem(GamePlayer player, ItemTemplate itemTemplate)
		{
			InventoryArtifact item = new InventoryArtifact(itemTemplate);
			if (!player.ReceiveItem(null, item))
			{
				player.Out.SendMessage(String.Format("Your backpack is full, please make some room and try again."), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
				return false;
			}

			return true;
		}
Ejemplo n.º 5
0
		protected void ReturnArtifact(GamePlayer player)
		{
			ItemTemplate itemTemplate = GameServer.Database.FindObjectByKey<ItemTemplate>(GetCustomProperty("Id_nb"));
			InventoryArtifact artifact = new InventoryArtifact(itemTemplate);
			artifact.ArtifactLevel = Convert.ToInt32(GetCustomProperty("ALevel"));
			artifact.Experience = Convert.ToInt64(GetCustomProperty("AXP"));
			artifact.UpdateAbilities(itemTemplate);

			if (!player.ReceiveItem(null, artifact))
			{
				player.Out.SendMessage(String.Format("Your backpack is full, please make some room and try again.  You may have to relog to get to complete this quest."), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
				return;
			}

			FinishQuest();
		}
Ejemplo n.º 6
0
        /// <summary>
        /// Hand out an artifact.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="player"></param>
        /// <param name="artifactID"></param>
        /// <param name="itemTemplate"></param>
        protected static bool GiveItem(GameLiving source, GamePlayer player, String artifactID, ItemTemplate itemTemplate)
        {
            InventoryItem item = new InventoryArtifact(itemTemplate);
            if (!player.ReceiveItem(source, item))
            {
                player.Out.SendMessage(LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "ArtifactQuest.GiveItem.BackpackFull"), eChatType.CT_Important, eChatLoc.CL_PopupWindow);
                return false;
            }

            return true;
        }