|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Code:
[CommandProperty( AccessLevel.GameMaster )]
public NpcGuild NpcGuild
{
get{ return m_NpcGuild; }
set{ m_NpcGuild = value; }
}
Do I need these before this value will return in a [props command? Is this just an internal function? Thank you for your time.
__________________
Dominus Exuro Looking for RP based, experienced RunUO scripters. http://home.comcast.net/~dominare/Dominion_main.htm |
|
|
|
|
|
|
#2 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
here is a description of the use of accessors in c#.
http://msdn.microsoft.com/library/de...pec_10_6_2.asp [CommandProperty( AccessLevel.GameMaster )] sets the CommandProperty attribute for individual properties that determines whether they can be accessed in-game via the [props gump or via [set and [get commands based on the AccessLevel of the person issuing the command. look here for a discussion of attributes http://msdn.microsoft.com/library/de...classtopic.asp
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#3 (permalink) |
|
Ok, so it does enable the [props values! Thank you Art!!!
So I will code one for each member of my class that I want visible in the props command. Woo HOO!!! Thank you again! PS - If my member is private, can it still be accessed in that way? Or does private only limit calls from other methods and classes? [code] // Path variables. private int m_warrior_path = 0; private int m_rogue_path = 0; private int m_scholar_path = 0; private int m_tradesman_path = 0; private int m_total_path = 0;CODE] Please don't feel obligated to keep answering, I know it's annoying having a noob attached to your leg. My apologies.
__________________
Dominus Exuro Looking for RP based, experienced RunUO scripters. http://home.comcast.net/~dominare/Dominion_main.htm |
|
|
|
|
|
|
#4 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
yes. The use of accessors is more general than just the [props interface, but that is certainly one use of it when combined with the CommandProperty attribute setting.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|