Esempio n. 1
0
        /// <summary>
        /// private internal Events on quest selections
        /// changed: 02.10.05
        /// </summary>
        private void DoQuestEvents( Character c, BaseQuest bq )
        {
            if ( c.QuestDone( bq ) ) return;

            if ( !c.QuestCompleted( bq ) )
            {
                if ( !c.HaveQuest( bq ) )
                {
                    if ( bq.HaveDeliveryObj && !HaveFreeSlot( c ) ) // quest need free slot
                    {
                        c.QuestFailed( qFailedReason.InventoryFull );
                    }
                    else if ( AmountActiveQuests( c ) >= 20 ) // questLog is full
                    {
                        c.QuestLogIsFull();
                    }
                    else // can get quest
                    {//need add questEmotion[] on get quest
                        c.ResponseQuestDetails( this, bq.Id, bq.Name, bq.Desc, bq.Details, getEmoteOnStart( bq ) );
                        //c.ResponseQuestDetails( this, bq.Id, bq.Name, bq.Desc, bq.Details, new qEmote[] { new qEmote( Emote.ONESHOT_TALK, 500 ) } );
                    }
                }
                else
                {
                    //c.QuestInvalid( qInvalidReason.ReadyHaveThatQuest );
                    c.SendGossip( this, OnlyQuests ? (int)NPCMenuId.Quests : (int)NPCMenuId.MainMenu, null, null );
                    //c.ResponseMessage( this, OnlyQuests ? (int)NPCMenuId.Quests : (int)NPCMenuId.MainMenu, bq.ProgressDialog );
                }
            }
            else if ( c.QuestCompleted( bq ) )
            {//need add questEmotion[] on complete quest
                c.OfferReward( this, bq.Id, bq.FinishTitle, bq.FinishDialog, getEmoteOnEnd( bq ) );
                //c.OfferReward( this, bq.Id, bq.FinishTitle, bq.FinishDialog, new qEmote[] { new qEmote( Emote.ONESHOT_TALK, 500 ) } );
            }
        }