if (Client.Account.PrivLevel ==1)
if(PrivelegeMgr.HavePrivilege(Client, ePrivLevel.Player))
if( !PrivilegeMgr.IsGameMaster(Client))
Graveen wrote:well, i exactly think this is a lot of work and/or will never be implemented
using DOL.Database.Attributes;
namespace DOL.Database
{
[DataTable(TableName = "access_level_template")]
public class AccessLevelTemplate : DataObject
{
private string m_id;
private bool m_allowStaffLogin;
private bool m_isAllowedToBeVisible;
private bool m_canAttackPlayers;
private bool m_canBeAttackedByPlayers;
private bool m_canAttackCreatures;
private bool m_canBeAttackedByCreatures;
private string m_allowedCommands;
public AccessLevelTemplate()
{
m_id = string.Empty;
m_allowStaffLogin = false;
m_isAllowedToBeVisible = true;
m_canAttackPlayers = true;
m_canBeAttackedByPlayers = true;
m_canAttackCreatures = true;
m_canBeAttackedByCreatures = true;
m_allowedCommands = string.Empty;
}
/// <summary>
/// Gets or sets the template id of the access level template
/// </summary>
[PrimaryKey]
public string AccessLevelTemplateID
{
get { return m_id; }
set { m_id = value; }
}
/// <summary>
/// Gets or sets if the assigned account is allowed to use the staff login (log in while the server is closed).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool AllowStaffLogin
{
get { return m_allowStaffLogin; }
set { m_allowStaffLogin = value; }
}
/// <summary>
/// Gets or sets if the assigned account is allowed to be visible for other accounts (no = false, yes = true).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool IsAllowedToBeVisible
{
get { return m_isAllowedToBeVisible; }
set { m_isAllowedToBeVisible = value; }
}
/// <summary>
/// Gets or sets if the assigned account is allowed to attack players (no = false, yes = true).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool CanAttackPlayers
{
get { return m_canAttackPlayers; }
set { m_canAttackPlayers = value; }
}
/// <summary>
/// Gets or sets if the assigned account can be attacked by players (no = false, yes = true).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool CanBeAttackedByPlayers
{
get { return m_canBeAttackedByPlayers; }
set { m_canBeAttackedByPlayers = value; }
}
/// <summary>
/// Gets or sets if the assigned account is allowed to attack creatures (no = false, yes = true).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool CanAttackCreatures
{
get { return m_canAttackCreatures; }
set { m_canAttackCreatures = value; }
}
/// <summary>
/// Gets or sets if the assigned account can be attacked by creatures (no = false, yes = true).
/// </summary>
[DataElement(AllowDbNull = false)]
public bool CanBeAttackedByCreatures
{
get { return m_canBeAttackedByCreatures; }
set { m_canBeAttackedByCreatures = value; }
}
/// <summary>
/// Gets or sets the commands the assigned account is allowed to use (seperated by semikolon: ';')
/// </summary>
[DataElement(AllowDbNull = true)]
public string AllowedCommands
{
get { return m_allowedCommands; }
set { m_allowedCommands = value; }
}
}
}
Return to “%s” DOL Code Contributions
Users browsing this forum: No registered users and 1 guest