Esempio n. 1
0
        public static QuestObjective DeserializeObjective(Type[] referenceTable, IGenericReader reader)
        {
            int encoding = reader.ReadEncodedInt();

            switch (encoding)
            {
            default:
            {
                return(null);
            }

            case 0x01:
            {
                Type type = ReadType(referenceTable, reader);

                QuestObjective obj = Construct(type) as QuestObjective;

                obj?.BaseDeserialize(reader);

                return(obj);
            }
            }
        }
Esempio n. 2
0
        public virtual void AddObjective( QuestObjective obj )
        {
            obj.System = this;
            m_Objectives.Add( obj );

            ShowQuestLogUpdated();
        }
Esempio n. 3
0
        public bool IsObjectiveInProgress(Type type)
        {
            QuestObjective obj = FindObjective(type);

            return(obj != null && !obj.Completed);
        }
        public static void Serialize( Type[] referenceTable, QuestObjective obj, GenericWriter writer )
        {
            if ( obj == null )
                writer.WriteEncodedInt( 0x00 );
            else
            {
                writer.WriteEncodedInt( 0x01 );

                Write( obj.GetType(), referenceTable, writer );

                obj.BaseSerialize( writer );
            }
        }
        public QuestObjectivesGump(ArrayList objectives) : base(90, 50)
        {
            m_Objectives = objectives;

            Closable = false;

            AddPage(0);

            AddImage(0, 0, 3600);
            AddImageTiled(0, 14, 15, 375, 3603);
            AddImageTiled(380, 14, 14, 375, 3605);
            AddImage(0, 376, 3606);
            AddImageTiled(15, 376, 370, 16, 3607);
            AddImageTiled(15, 0, 370, 16, 3601);
            AddImage(380, 0, 3602);
            AddImage(380, 376, 3608);

            AddImageTiled(15, 15, 365, 365, 2624);
            AddAlphaRegion(15, 15, 365, 365);

            AddImage(20, 87, 1231);
            AddImage(75, 62, 9307);

            AddHtmlLocalized(117, 35, 230, 20, 1046026, Blue, false, false);             // Quest Log

            AddImage(77, 33, 9781);
            AddImage(65, 110, 2104);

            AddHtmlLocalized(79, 106, 230, 20, 1049073, Blue, false, false);             // Objective:

            AddImageTiled(68, 125, 120, 1, 9101);
            AddImage(65, 240, 2104);

            AddHtmlLocalized(79, 237, 230, 20, 1049076, Blue, false, false);             // Progress details:

            AddImageTiled(68, 255, 120, 1, 9101);
            AddButton(175, 355, 2313, 2312, 1, GumpButtonType.Reply, 0);

            AddImage(341, 15, 10450);
            AddImage(341, 330, 10450);
            AddImage(15, 330, 10450);
            AddImage(15, 15, 10450);

            AddPage(1);

            for (int i = 0; i < objectives.Count; ++i)
            {
                QuestObjective obj = (QuestObjective)objectives[objectives.Count - 1 - i];

                if (i > 0)
                {
                    AddButton(55, 346, 9909, 9911, 0, GumpButtonType.Page, 1 + i);
                    AddHtmlLocalized(82, 347, 50, 20, 1043354, White, false, false);                     // Previous

                    AddPage(1 + i);
                }

                obj.RenderMessage(this);
                obj.RenderProgress(this);

                if (i > 0)
                {
                    AddButton(317, 346, 9903, 9905, 0, GumpButtonType.Page, i);
                    AddHtmlLocalized(278, 347, 50, 20, 1043353, White, false, false);                     // Next
                }
            }
        }
 public QuestObjectivesGump(QuestObjective obj) : this(BuildList(obj))
 {
 }
Esempio n. 7
0
		public QuestObjectivesGump( QuestObjective obj ) : this( BuildList( obj ) )
		{
		}
Esempio n. 8
0
        public bool IsObjectiveInProgress(Type type)
        {
            QuestObjective obj = FindObjective(type);

            return(obj?.Completed == false);
        }