Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 08-24-2004, 10:18 AM   #1 (permalink)
 
Join Date: Dec 2003
Location: Indianapolis
Age: 38
Posts: 128
Send a message via ICQ to Blackette
Default Question on CommandProperty

Code:
		[CommandProperty( AccessLevel.GameMaster )]
		public NpcGuild NpcGuild
		{
			get{ return m_NpcGuild; }
			set{ m_NpcGuild = value; }
		}
What is this? I've made my way through a couple of C# books now, but not sure what this is.

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
Blackette is offline   Reply With Quote
Old 08-24-2004, 10:54 AM   #2 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

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
ArteGordon is offline   Reply With Quote
Old 08-24-2004, 11:07 AM   #3 (permalink)
 
Join Date: Dec 2003
Location: Indianapolis
Age: 38
Posts: 128
Send a message via ICQ to Blackette
Default

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
Blackette is offline   Reply With Quote
Old 08-24-2004, 11:15 AM   #4 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

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
ArteGordon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5