Ejemplo n.º 1
0
        public void Load(List <Character_quest> Quests)
        {
            if (Quests == null)
            {
                return;
            }

            foreach (Character_quest Quest in Quests)
            {
                Quest.Quest = WorldMgr.GetQuest(Quest.QuestID);
                if (Quest.Quest == null)
                {
                    continue;
                }

                foreach (Character_Objectives Obj in Quest._Objectives)
                {
                    Obj.Objective = WorldMgr.GetQuestObjective(Obj.ObjectiveID);
                }

                if (!_Quests.ContainsKey(Quest.QuestID))
                {
                    _Quests.Add(Quest.QuestID, Quest);
                }
            }
        }
Ejemplo n.º 2
0
        public void Load(Character_quest_inprogress[] InProgressQuests)
        {
            if (InProgressQuests == null)
            {
                return;
            }

            foreach (Character_quest_inprogress Quest in InProgressQuests)
            {
                Quest.Quest = WorldMgr.GetQuest(Quest.QuestID);

                if (Quest.Quest == null)
                {
                    continue;
                }

                foreach (Character_InProgressObjectives Obj in Quest._InProgressObjectives)
                {
                    Obj.Objective = WorldMgr.GetQuestObjective(Obj.ObjectiveID);
                }

                if (!_InProgressQuests.ContainsKey(Quest.QuestID))
                {
                    _InProgressQuests.Add(Quest.QuestID, Quest);
                }
            }
        }
Ejemplo n.º 3
0
        public void BuildQuest(UInt16 QuestID, Player Plr)
        {
            Quest Q = WorldMgr.GetQuest(QuestID);

            if (Q == null)
            {
                return;
            }

            PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);

            Out.WriteByte(1);
            Out.WriteByte(1);

            BuildQuestInteract(Out, Q.Entry, _Owner.Oid, Plr.Oid);

            Out.WriteUInt16(0);

            BuildQuestInfo(Out, Plr, Q);

            Plr.SendPacket(Out);
        }
Ejemplo n.º 4
0
 public bool AcceptQuest(UInt16 QuestID)
 {
     return(AcceptQuest(WorldMgr.GetQuest(QuestID)));
 }