/// <summary> /// Initializes a new instance of the <see cref="QuestTable"/> class. /// </summary> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="repeatable">The initial value for the corresponding property.</param> /// <param name="rewardCash">The initial value for the corresponding property.</param> /// <param name="rewardExp">The initial value for the corresponding property.</param> public QuestTable(QuestID @iD, Boolean @repeatable, Int32 @rewardCash, Int32 @rewardExp) { ID = @iD; Repeatable = @repeatable; RewardCash = @rewardCash; RewardExp = @rewardExp; }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.CompletedQuestAdded"/> event. /// </summary> /// <param name="questID">The ID of the quest that was added.</param> protected override void OnCompletedQuestAdded(QuestID questID) { base.OnCompletedQuestAdded(questID); UserInfo.HasStartQuestRequirements.Update(questID); UserInfo.HasFinishQuestRequirements.SetRequirementsStatus(questID, false); }
/// <summary> /// Initializes a new instance of the <see cref="CharacterQuestStatusTable"/> class. /// </summary> /// <param name="characterID">The initial value for the corresponding property.</param> /// <param name="completedOn">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> /// <param name="startedOn">The initial value for the corresponding property.</param> public CharacterQuestStatusTable(CharacterID @characterID, DateTime? @completedOn, QuestID @questID, DateTime @startedOn) { CharacterID = @characterID; CompletedOn = @completedOn; QuestID = @questID; StartedOn = @startedOn; }
public static PacketWriter AcceptOrTurnInQuest(MapEntityIndex questProvider, QuestID questID) { var pw = GetWriter(ClientPacketID.AcceptOrTurnInQuest); pw.Write(questProvider); pw.Write(questID); return pw; }
/// <summary> /// Initializes a new instance of the <see cref="QueryArgs"/> struct. /// </summary> /// <param name="characterID">The character ID.</param> /// <param name="questID">The quest ID.</param> /// <param name="characterTemplateID">The character template ID.</param> /// <param name="count">The count.</param> public QueryArgs(CharacterID characterID, QuestID questID, CharacterTemplateID characterTemplateID, ushort count) { _characterID = characterID; _questID = questID; _characterTemplateID = characterTemplateID; _count = count; }
public void Execute(QuestID questID, IEnumerable <KeyValuePair <CharacterTemplateID, ushort> > reqChars) { foreach (var item in reqChars) { Execute(questID, item.Key, item.Value); } }
/// <summary> /// Sets whether or not we have the requirements for a quest. /// </summary> /// <param name="questID">The ID of the quest.</param> /// <param name="hasRequirements">True if we have the requirements for the quest; false if we do not.</param> public void SetRequirementsStatus(QuestID questID, bool hasRequirements) { if (!_statuses.ContainsKey(questID)) _statuses.Add(questID, hasRequirements); else _statuses[questID] = hasRequirements; }
public static PacketWriter HasQuestStartRequirements(QuestID questID) { var pw = GetWriter(ClientPacketID.HasQuestStartRequirements); pw.Write(questID); return(pw); }
public static PacketWriter HasQuestStartRequirements(QuestID questID, bool hasRequirements) { var ret = GetWriter(ServerPacketID.HasQuestStartRequirementsReply); ret.Write(questID); ret.Write(hasRequirements); return ret; }
public void Execute(QuestID questID, IEnumerable <KeyValuePair <ItemTemplateID, byte> > items) { foreach (var item in items) { Execute(questID, item.Key, item.Value); } }
void SendHasQuestStartRequirements(QuestID questID) { using (var pw = ClientPacket.HasQuestStartRequirements(questID)) { _socket.Send(pw, ClientMessageType.GUIQuestStatusRequest); } }
public void Execute(QuestID questID, IEnumerable <QuestID> reqQuests) { foreach (var item in reqQuests) { Execute(questID, item); } }
public static PacketWriter AcceptOrTurnInQuest(MapEntityIndex questProvider, QuestID questID) { var pw = GetWriter(ClientPacketID.AcceptOrTurnInQuest); pw.Write(questProvider); pw.Write(questID); return(pw); }
/// <summary> /// Initializes a new instance of the <see cref="CharacterQuestStatusKillsTable"/> class. /// </summary> /// <param name="characterID">The initial value for the corresponding property.</param> /// <param name="characterTemplateID">The initial value for the corresponding property.</param> /// <param name="count">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> public CharacterQuestStatusKillsTable(CharacterID @characterID, CharacterTemplateID @characterTemplateID, UInt16 @count, QuestID @questID) { CharacterID = @characterID; CharacterTemplateID = @characterTemplateID; Count = @count; QuestID = @questID; }
public static PacketWriter AcceptOrTurnInQuestReply(QuestID questID, bool successful, bool accepted) { var pw = GetWriter(ServerPacketID.AcceptOrTurnInQuestReply); pw.Write(questID); pw.Write(successful); pw.Write(accepted); return pw; }
public Quest(QuestID id, string name, string description, int rewardExperiencePoints, int rewardGold) { ID = id; Name = name; Description = description; RewardXp = rewardExperiencePoints; RewardGold = rewardGold; QuestCompletionItems = new List <QuestCompletionItem>(); }
/// <summary> /// Starts getting the status for the given <paramref name="quest"/> if the value is not already acquired. /// </summary> /// <param name="quest">The quest to get the status for.</param> public void Prepare(QuestID quest) { if (_statuses.ContainsKey(quest)) return; _statuses.Add(quest, null); _sendRequest(quest); }
/// <summary> /// When overridden in the derived class, adds when a user completes a quest. /// </summary> /// <param name="user">The user that completed a quest.</param> /// <param name="questID">The ID of the quest that the user completed.</param> protected override void InternalAddQuestComplete(User user, QuestID questID) { var mapID = (user.Map == null ? (MapID?)null : user.Map.ID); var args = new WorldStatsQuestCompleteTable(when: Now(), mapID: mapID, questID: questID, userID: user.ID, x: (ushort)user.Position.X, y: (ushort)user.Position.Y, iD: 0); _questCompleteQuery.Execute(args); }
private Quest GetQuest(QuestID id) { if (!questsInitialized) { InitQuests(); } return(allQuests [id]); }
public void ActivateQuest(QuestID id) { //activate first quest from timelogic/new day //display goals in quest UI //on interacting, check if it was achieved? questUI.DisplayQuest(GetQuest(id)); activeQuests.Add(id, GetQuest(id)); }
public override int WriteTo(byte[] Buffer, int StartIndex = 0) { int cursor = StartIndex; cursor += base.WriteTo(Buffer, cursor); cursor += NPCID.WriteTo(Buffer, cursor); cursor += QuestID.WriteTo(Buffer, cursor); return(cursor - StartIndex); }
public C2S_OnQuestEvent(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.QuestEvent = reader.ReadQuestEvent(); this.QuestID = reader.ReadQuestID(); this.ExtraBytes = reader.ReadLeft(); }
/// <summary> /// Gets the string to draw for a list item. /// </summary> /// <param name="x">The item to draw.</param> /// <returns>The string to draw for a list item.</returns> static string GetDrawString(QuestID x) { var qdc = QuestDescriptionCollection.Create(ContentPaths.Dev); var t = qdc[x]; if (t == null) return x.ToString(); else return t.QuestID + ". " + t.Name + " - " + t.Description; }
/// <summary> /// Initializes a new instance of the <see cref="WorldStatsQuestCancelTable"/> class. /// </summary> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="mapID">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> /// <param name="userID">The initial value for the corresponding property.</param> /// <param name="when">The initial value for the corresponding property.</param> /// <param name="x">The initial value for the corresponding property.</param> /// <param name="y">The initial value for the corresponding property.</param> public WorldStatsQuestCancelTable(UInt32 @iD, MapID? @mapID, QuestID @questID, CharacterID @userID, DateTime @when, UInt16 @x, UInt16 @y) { ID = @iD; MapID = @mapID; QuestID = @questID; UserID = @userID; When = @when; X = @x; Y = @y; }
public void CompleteQuest(QuestID questID) { if (QuestCompletion.ContainsKey(questID)) { QuestCompletion[questID] = true; } else { DebugLogErrorKeyDoesNotExist(questID); } }
public bool IsCompleted(QuestID questID) { if (QuestCompletion.TryGetValue(questID, out bool completed)) { return(completed); } else { DebugLogErrorKeyDoesNotExist(questID); return(false); } }
/// <summary> /// Initializes a new instance of the <see cref="Quest"/> class. /// </summary> /// <param name="questID">The quest's ID.</param> /// <param name="dbController">The <see cref="IDbController"/> to use to load the values.</param> public Quest(QuestID questID, IDbController dbController) { _questID = questID; var info = dbController.GetQuery <SelectQuestQuery>().Execute(questID); _repeatable = info.Repeatable; _rewards = LoadRewards(questID, info, dbController); _startRequirements = LoadStartRequirements(dbController); _finishRequirements = LoadFinishRequirements(dbController); }
/// <summary> /// Adds the given state(s) to the quest with the given ID (keeping any old states) /// </summary> /// <param name="id">The particular quest</param> /// <param name="state">The state(s) to add</param> public static void addQuestState(QuestID id, QuestState state) { nullCheck(); triggers[(int)id] |= state; //push event QuestEventArgs args = new QuestEventArgs(); args.questID = id; args.questStateChange = state; args.add = true; pushEvent(args); }
/// <summary> /// Initializes a new instance of the <see cref="EditorQuest"/> class. /// </summary> /// <param name="questID">The quest ID.</param> /// <param name="dbController">The <see cref="IDbController"/>.</param> /// <exception cref="ArgumentException">No quests for the given <paramref name="questID"/> exist.</exception> public EditorQuest(QuestID questID, IDbController dbController) { _id = questID; // Get the quest database table row var questTable = dbController.GetQuery <SelectQuestQuery>().Execute(questID); if (questTable == null) { const string errmsg = "Invalid QuestID ({0}) supplied - no quests with this ID exists."; throw new ArgumentException(string.Format(errmsg, questID), "questID"); } Debug.Assert(questID == questTable.ID); // Get the quest description stuff from the client-side var qd = _questDescriptions[ID]; if (qd != null) { Name = qd.Name; Description = qd.Description; } else { Name = string.Empty; Description = string.Empty; } // Get the quest details from the server side RewardExp = questTable.RewardExp; RewardCash = questTable.RewardCash; Repeatable = questTable.Repeatable; _startItems = dbController.GetQuery <SelectQuestRequireStartItemQuery>().Execute(questID).Select( x => new MutablePair <ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _finishItems = dbController.GetQuery <SelectQuestRequireFinishItemQuery>().Execute(questID).Select( x => new MutablePair <ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _startQuests = dbController.GetQuery <SelectQuestRequireStartCompleteQuestsQuery>().Execute(questID).ToList(); _finishQuests = dbController.GetQuery <SelectQuestRequireFinishCompleteQuestsQuery>().Execute(questID).ToList(); _rewardItems = dbController.GetQuery <SelectQuestRewardItemQuery>().Execute(questID).Select( x => new MutablePair <ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _kills = dbController.GetQuery <SelectQuestRequireKillQuery>().Execute(questID).Select( x => new MutablePair <CharacterTemplateID, ushort>(x.CharacterTemplateID, x.Amount)).ToList(); }
/// <summary> /// Gets if the user has the requirements for the given quest. /// </summary> /// <param name="quest">The ID of the quest to check for the requirements of.</param> /// <returns>True if the user has the requirements for the given <paramref name="quest"/>, false if they /// do not have the requirements, or null if the status is currently unknown.</returns> public bool? HasRequirements(QuestID quest) { bool? value; // Try to get the cached value if (!_statuses.TryGetValue(quest, out value)) { // Value was not in the cache, so make the request, and return null for now value = null; Prepare(quest); } return value; }
/// <summary> /// Gets the string to draw for a list item. /// </summary> /// <param name="x">The item to draw.</param> /// <returns>The string to draw for a list item.</returns> static string GetDrawString(QuestID x) { var qdc = QuestDescriptionCollection.Create(ContentPaths.Dev); var t = qdc[x]; if (t == null) { return(x.ToString()); } else { return(t.QuestID + ". " + t.Name + " - " + t.Description); } }
/// <summary> /// Initializes a new instance of the <see cref="EditorQuest"/> class. /// </summary> /// <param name="questID">The quest ID.</param> /// <param name="dbController">The <see cref="IDbController"/>.</param> /// <exception cref="ArgumentException">No quests for the given <paramref name="questID"/> exist.</exception> public EditorQuest(QuestID questID, IDbController dbController) { _id = questID; // Get the quest database table row var questTable = dbController.GetQuery<SelectQuestQuery>().Execute(questID); if (questTable == null) { const string errmsg = "Invalid QuestID ({0}) supplied - no quests with this ID exists."; throw new ArgumentException(string.Format(errmsg, questID), "questID"); } Debug.Assert(questID == questTable.ID); // Get the quest description stuff from the client-side var qd = _questDescriptions[ID]; if (qd != null) { Name = qd.Name; Description = qd.Description; } else { Name = string.Empty; Description = string.Empty; } // Get the quest details from the server side RewardExp = questTable.RewardExp; RewardCash = questTable.RewardCash; Repeatable = questTable.Repeatable; _startItems = dbController.GetQuery<SelectQuestRequireStartItemQuery>().Execute(questID).Select( x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _finishItems = dbController.GetQuery<SelectQuestRequireFinishItemQuery>().Execute(questID).Select( x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _startQuests = dbController.GetQuery<SelectQuestRequireStartCompleteQuestsQuery>().Execute(questID).ToList(); _finishQuests = dbController.GetQuery<SelectQuestRequireFinishCompleteQuestsQuery>().Execute(questID).ToList(); _rewardItems = dbController.GetQuery<SelectQuestRewardItemQuery>().Execute(questID).Select( x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList(); _kills = dbController.GetQuery<SelectQuestRequireKillQuery>().Execute(questID).Select( x => new MutablePair<CharacterTemplateID, ushort>(x.CharacterTemplateID, x.Amount)).ToList(); }
public S2C_HandleQuestUpdate(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.ChannelID = channelID; this.SenderNetID = senderNetID; this.Objective = reader.ReadFixedString(128); this.Icon = reader.ReadFixedString(128); this.Tooltip = reader.ReadFixedString(128); this.Reward = reader.ReadFixedString(128); this.QuestType = reader.ReadQuestType(); this.QuestUpdateData = reader.ReadQuestUpdateData(); this.QuestID = reader.ReadQuestID(); this.ExtraBytes = reader.ReadLeft(); }
public void CompleteQuest(QuestID questID) { if (!QuestData.IsCompleted(questID)) { QuestChapter currentQuestChapter = IsValidQuestChapterIndex(CurrentQuestChapterIndex) ? QuestBook.QuestChapters[CurrentQuestChapterIndex] : null; if (currentQuestChapter != null && currentQuestChapter.Contains(questID)) { QuestData.CompleteQuest(questID); if (QuestBook.QuestChapters[CurrentQuestChapterIndex].Quests.All((quest) => QuestData.IsCompleted(quest.ID))) { CurrentQuestChapterIndex++; } } } }
/// <summary> /// Executes the query. /// </summary> /// <param name="id">The <see cref="QuestID"/> to get the values for.</param> /// <returns>The returned values from the query.</returns> public virtual IEnumerable <T> Execute(QuestID id) { var ret = new List <T>(); using (var r = ExecuteReader(id)) { while (r.Read()) { var q = ReadRow(r); ret.Add(q); } } return(ret); }
/// <summary> /// Loads the rewards for finishing a quest. /// </summary> /// <param name="questID">The ID of the quest.</param> /// <param name="table">The <see cref="IQuestTable"/>.</param> /// <param name="dbController">The <see cref="IDbController"/> to use to load values.</param> /// <returns>The rewards for finishing a quest.</returns> static IQuestRewardCollection <User> LoadRewards(QuestID questID, IQuestTable table, IDbController dbController) { var l = new List <IQuestReward <User> > { new MoneyQuestReward(table.RewardCash), new ExpQuestReward(table.RewardExp) }; // Items var rewardItems = dbController.GetQuery <SelectQuestRewardItemQuery>().Execute(questID); if (!rewardItems.IsEmpty()) { l.Add(new ItemsQuestReward(rewardItems.Select(x => new QuestItemTemplateAmount(x.ItemTemplateID, x.Amount)))); } return(new QuestRewardCollection <User>(l)); }
/// <summary> /// Adds when a user completes a quest. /// </summary> /// <param name="user">The user that completed a quest.</param> /// <param name="questID">The ID of the quest that the user completed.</param> public void AddQuestComplete(TUser user, QuestID questID) { try { if (user == null) { return; } InternalAddQuestComplete(user, questID); } catch (Exception ex) { OnQueryException(ex); } }
/// <summary> /// Appends a message to a <see cref="BitStream"/> for synchronizing the client's quest information for when /// a quest is completed. /// The message is then read and handled by the receiver using <see cref="UserQuestInformation.Read"/>. /// </summary> /// <param name="bs">The <see cref="BitStream"/> to append the message to.</param> /// <param name="questID">The ID of the completed quest.</param> public static void WriteAddCompletedQuest(BitStream bs, QuestID questID) { bs.WriteEnum(QuestInfoMessages.AddCompletedQuest); bs.Write(questID); }
/// <summary> /// Appends a message to a <see cref="BitStream"/> for synchronizing the client's quest information for when /// a quest is removed from the active quests. /// The message is then read and handled by the receiver using <see cref="UserQuestInformation.Read"/>. /// </summary> /// <param name="bs">The <see cref="BitStream"/> to append the message to.</param> /// <param name="questID">The ID of the removed active quest.</param> public static void WriteRemoveActiveQuest(BitStream bs, QuestID questID) { bs.WriteEnum(QuestInfoMessages.RemoveActiveQuest); bs.Write(questID); }
/// <summary> /// Gets the <see cref="IQuestDescription"/> for a quest. /// </summary> /// <param name="questID">The ID of the quest to get the <see cref="IQuestDescription"/> for.</param> /// <returns>The <see cref="IQuestDescription"/> for the given <see cref="QuestID"/>.</returns> public IQuestDescription this[QuestID questID] { get { if (!_questDescriptions.CanGet(questID.GetRawValue())) return null; return _questDescriptions[questID.GetRawValue()]; } }
/// <summary> /// Initializes a new instance of the <see cref="CharacterTemplateQuestProviderTable"/> class. /// </summary> /// <param name="characterTemplateID">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> public CharacterTemplateQuestProviderTable(CharacterTemplateID @characterTemplateID, QuestID @questID) { CharacterTemplateID = @characterTemplateID; QuestID = @questID; }
/// <summary> /// Initializes a new instance of the <see cref="CharacterQuestStatusKillsTable"/> class. /// </summary> /// <param name="characterID">The initial value for the corresponding property.</param> /// <param name="characterTemplateID">The initial value for the corresponding property.</param> /// <param name="count">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> public CharacterQuestStatusKillsTable(CharacterID @characterID, CharacterTemplateID @characterTemplateID, UInt16 @count, QuestID @questID) { CharacterID = @characterID; CharacterTemplateID = @characterTemplateID; Count = @count; QuestID = @questID; }
/// <summary> /// Gets the <see cref="IQuestDescription"/> for a quest, or an empty description if the quest /// description could not be found for the specified <paramref name="questID"/>. /// </summary> /// <param name="questID">The ID of the quest to get the <see cref="IQuestDescription"/> for.</param> /// <returns>The <see cref="IQuestDescription"/> for a quest, or an empty description if the quest /// description could not be found for the specified <paramref name="questID"/>.</returns> public IQuestDescription GetOrDefault(QuestID questID) { var ret = this[questID]; if (ret == null) { return new QuestDescription { Name = "[Unknown Quest: " + questID + "]", Description = "No description for this quest could be found.", QuestID = questID }; } else return ret; }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.RepeatableQuestAdded"/> event. /// </summary> /// <param name="questID">The ID of the quest that was added.</param> protected virtual void OnRepeatableQuestAdded(QuestID questID) { }
void RecvStartQuestChatDialog(IIPSocket conn, BitStream r) { var npcIndex = r.ReadMapEntityIndex(); // Available quests var numAvailableQuests = r.ReadByte(); var availableQuests = new QuestID[numAvailableQuests]; for (var i = 0; i < availableQuests.Length; i++) { availableQuests[i] = r.ReadQuestID(); } // Quests that can be turned in var numTurnInQuests = r.ReadByte(); var turnInQuests = new QuestID[numTurnInQuests]; for (var i = 0; i < turnInQuests.Length; i++) { turnInQuests[i] = r.ReadQuestID(); } // For the quests that are available, make sure we set their status to not being able to be turned in (just in case) foreach (var id in availableQuests) { UserInfo.HasFinishQuestRequirements.SetRequirementsStatus(id, false); } // For the quests that were marked as being able to turn in, set their status to being able to be finished foreach (var id in turnInQuests) { UserInfo.HasFinishQuestRequirements.SetRequirementsStatus(id, true); } // Grab the descriptions for both the available quests and quests we can turn in var qds = availableQuests.Concat(turnInQuests).Distinct().Select(x => _questDescriptions.GetOrDefault(x)).ToArray(); // Display the form GameplayScreen.AvailableQuestsForm.Display(qds, npcIndex); }
/// <summary> /// Initializes a new instance of the <see cref="QuestRequireFinishItemTable"/> class. /// </summary> /// <param name="amount">The initial value for the corresponding property.</param> /// <param name="itemTemplateID">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> public QuestRequireFinishItemTable(Byte @amount, ItemTemplateID @itemTemplateID, QuestID @questID) { Amount = @amount; ItemTemplateID = @itemTemplateID; QuestID = @questID; }
/// <summary> /// Appends a message to a <see cref="BitStream"/> for synchronizing the client's quest information for when /// a quest is repeatable. /// The message is then read and handled by the receiver using <see cref="UserQuestInformation.Read"/>. /// </summary> /// <param name="bs">The <see cref="BitStream"/> to append the message to.</param> /// <param name="questID">The ID of the repeatable quest.</param> public static void WriteAddRepeatableQuest(BitStream bs, QuestID questID) { bs.WriteEnum(QuestInfoMessages.AddRepeatableQuest); bs.Write(questID); }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.CompletedQuestAdded"/> event. /// </summary> /// <param name="questID">The ID of the quest that was added.</param> protected virtual void OnCompletedQuestAdded(QuestID questID) { }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.CompletedQuestAdded"/> event. /// </summary> /// <param name="questID">The ID of the quest that was added.</param> protected override void OnCompletedQuestAdded(QuestID questID) { base.OnCompletedQuestAdded(questID); UserInfo.HasStartQuestRequirements.Update(questID); UserInfo.HasFinishQuestRequirements.SetRequirementsStatus(questID, false); }
void RecvSetProvidedQuests(IIPSocket conn, BitStream r) { var mapEntityIndex = r.ReadMapEntityIndex(); var count = r.ReadByte(); var questIDs = new QuestID[count]; for (var i = 0; i < count; i++) { questIDs[i] = r.ReadQuestID(); } var character = _objGrabber.GetDynamicEntity<Character>(mapEntityIndex); if (character != null) character.ProvidedQuests = questIDs; }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.ActiveQuestAdded"/> event. /// </summary> /// <param name="questID">The ID of the quest that was added.</param> protected virtual void OnActiveQuestAdded(QuestID questID) { }
/// <summary> /// Initializes a new instance of the <see cref="QuestRequireStartQuestTable"/> class. /// </summary> /// <param name="questID">The initial value for the corresponding property.</param> /// <param name="reqQuestID">The initial value for the corresponding property.</param> public QuestRequireStartQuestTable(QuestID @questID, QuestID @reqQuestID) { QuestID = @questID; ReqQuestID = @reqQuestID; }
/// <summary> /// When overridden in the derived class, allows for handling the /// <see cref="UserQuestInformation.ActiveQuestRemoved"/> event. /// </summary> /// <param name="questID">The ID of the quest that was removed.</param> protected virtual void OnActiveQuestRemoved(QuestID questID) { }
public static PacketWriter HasQuestStartRequirements(QuestID questID) { var pw = GetWriter(ClientPacketID.HasQuestStartRequirements); pw.Write(questID); return pw; }
void SendHasQuestStartRequirements(QuestID questID) { using (var pw = ClientPacket.HasQuestStartRequirements(questID)) { _socket.Send(pw, ClientMessageType.GUIQuestStatusRequest); } }
/// <summary> /// Initializes a new instance of the <see cref="EventCountersQuestTable"/> class. /// </summary> /// <param name="counter">The initial value for the corresponding property.</param> /// <param name="questEventCounterId">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> public EventCountersQuestTable(Int64 @counter, Byte @questEventCounterId, QuestID @questID) { Counter = @counter; QuestEventCounterId = @questEventCounterId; QuestID = @questID; }
/// <summary> /// Initializes a new instance of the <see cref="WorldStatsQuestCancelTable"/> class. /// </summary> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="mapID">The initial value for the corresponding property.</param> /// <param name="questID">The initial value for the corresponding property.</param> /// <param name="userID">The initial value for the corresponding property.</param> /// <param name="when">The initial value for the corresponding property.</param> /// <param name="x">The initial value for the corresponding property.</param> /// <param name="y">The initial value for the corresponding property.</param> public WorldStatsQuestCancelTable(UInt32 @iD, MapID? @mapID, QuestID @questID, CharacterID @userID, DateTime @when, UInt16 @x, UInt16 @y) { ID = @iD; MapID = @mapID; QuestID = @questID; UserID = @userID; When = @when; X = @x; Y = @y; }
/// <summary> /// Initializes a new instance of the <see cref="QuestRequireFinishQuestTable"/> class. /// </summary> /// <param name="questID">The initial value for the corresponding property.</param> /// <param name="reqQuestID">The initial value for the corresponding property.</param> public QuestRequireFinishQuestTable(QuestID @questID, QuestID @reqQuestID) { QuestID = @questID; ReqQuestID = @reqQuestID; }