#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
81
Scripts/Engines/VeteranRewards/RewardEntry.cs
Normal file
81
Scripts/Engines/VeteranRewards/RewardEntry.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.VeteranRewards
|
||||
{
|
||||
public class RewardEntry
|
||||
{
|
||||
private RewardList m_List;
|
||||
private RewardCategory m_Category;
|
||||
private Type m_ItemType;
|
||||
private Expansion m_RequiredExpansion;
|
||||
private int m_Name;
|
||||
private string m_NameString;
|
||||
private object[] m_Args;
|
||||
|
||||
public RewardList List{ get{ return m_List; } set{ m_List = value; } }
|
||||
public RewardCategory Category{ get{ return m_Category; } }
|
||||
public Type ItemType{ get{ return m_ItemType; } }
|
||||
public Expansion RequiredExpansion{ get{ return m_RequiredExpansion; } }
|
||||
public int Name{ get{ return m_Name; } }
|
||||
public string NameString{ get{ return m_NameString; } }
|
||||
public object[] Args{ get{ return m_Args; } }
|
||||
|
||||
public Item Construct()
|
||||
{
|
||||
try
|
||||
{
|
||||
Item item = Activator.CreateInstance( m_ItemType, m_Args ) as Item;
|
||||
|
||||
if ( item is IRewardItem )
|
||||
((IRewardItem)item).IsRewardItem = true;
|
||||
|
||||
return item;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public RewardEntry( RewardCategory category, int name, Type itemType, params object[] args )
|
||||
{
|
||||
m_Category = category;
|
||||
m_ItemType = itemType;
|
||||
m_RequiredExpansion = Expansion.None;
|
||||
m_Name = name;
|
||||
m_Args = args;
|
||||
category.Entries.Add( this );
|
||||
}
|
||||
|
||||
public RewardEntry( RewardCategory category, string name, Type itemType, params object[] args )
|
||||
{
|
||||
m_Category = category;
|
||||
m_ItemType = itemType;
|
||||
m_RequiredExpansion = Expansion.None;
|
||||
m_NameString = name;
|
||||
m_Args = args;
|
||||
category.Entries.Add( this );
|
||||
}
|
||||
|
||||
public RewardEntry( RewardCategory category, int name, Type itemType, Expansion requiredExpansion, params object[] args )
|
||||
{
|
||||
m_Category = category;
|
||||
m_ItemType = itemType;
|
||||
m_RequiredExpansion = requiredExpansion;
|
||||
m_Name = name;
|
||||
m_Args = args;
|
||||
category.Entries.Add( this );
|
||||
}
|
||||
|
||||
public RewardEntry( RewardCategory category, string name, Type itemType, Expansion requiredExpansion, params object[] args )
|
||||
{
|
||||
m_Category = category;
|
||||
m_ItemType = itemType;
|
||||
m_RequiredExpansion = requiredExpansion;
|
||||
m_NameString = name;
|
||||
m_Args = args;
|
||||
category.Entries.Add( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue