Skip to content

Commit

Permalink
Add RewardQuests (Dawn-of-Light#477)
Browse files Browse the repository at this point in the history
Add RewardQuests like on Live. These differ from normal DataQuests in that they show markers on the map, show extra information in journal (with option to create items) and that selected steps can be done out of order.
  • Loading branch information
NetDwarf authored Oct 15, 2023
2 parents 4cb38ee + 1b24e73 commit ea76cb2
Show file tree
Hide file tree
Showing 16 changed files with 3,794 additions and 49 deletions.
119 changes: 119 additions & 0 deletions DOLDatabase/Tables/CharacterXRewardQuest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/*
* DAWN OF LIGHT - The first free open source DAoC server emulator
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
using System;
using DOL.Database.Attributes;

namespace DOL.Database
{
/// <summary>
/// Holds all the GenericQuests available
/// </summary>
[DataTable(TableName = "CharacterXRewardQuest")]

public class CharacterXRewardQuest : DataObject
{
private int m_id;
private string m_characterID;
private int m_dataQuestID;
private short m_step;
private short m_count;
private string m_customPropertiesString;

public CharacterXRewardQuest()
{
}

/// <summary>
/// Create a new entry for this quest
/// </summary>
/// <param name="characterID"></param>
/// <param name="dataQuestID"></param>
public CharacterXRewardQuest(string characterID, int dataQuestID)
{
m_characterID = characterID;
m_dataQuestID = dataQuestID;
m_step = 1;
m_count = 0;
}

[PrimaryKey(AutoIncrement=true)]
public int ID
{
get { return m_id; }
set { m_id = value; }
}

/// <summary>
/// DOLCharacters_ID of this player
/// </summary>
[DataElement(Varchar = 100, AllowDbNull = false, IndexColumns = "DataQuestID")]
public string Character_ID
{
get { return m_characterID; }
set { m_characterID = value; Dirty = true; }
}

/// <summary>
/// The ID of the DataQuest
/// </summary>
[DataElement(AllowDbNull = false)]
public int DataQuestID
{
get { return m_dataQuestID; }
set { m_dataQuestID = value; Dirty = true; }
}

/// <summary>
/// 0 = completed
/// </summary>
[DataElement(AllowDbNull = false)]
public short Step
{
get { return m_step; }
set { m_step = value; Dirty = true; }
}

/// <summary>
/// How many times has this player done this quest?
/// </summary>
[DataElement(AllowDbNull = false)]
public short Count
{
get { return m_count; }
set { m_count = value; Dirty = true; }
}

/// <summary>
/// Custom properties string
/// </summary>
[DataElement(AllowDbNull=true,Unique=false)]
public string CustomPropertiesString
{
get
{
return m_customPropertiesString;
}
set
{
Dirty = true;
m_customPropertiesString = value;
}
}
}
}
Loading

0 comments on commit ea76cb2

Please sign in to comment.