View Single Post
Old 08-07-2008, 10:30 AM   #16 (permalink)
vermillion2083
Forum Expert
 
vermillion2083's Avatar
 
Join Date: Jun 2005
Location: Lansing, MI
Age: 25
Posts: 1,042
Send a message via ICQ to vermillion2083 Send a message via MSN to vermillion2083
Default

Quote:
Originally Posted by typhoonbot View Post
Was just reading on in your earlier post, and you queried about the guild robe situation. That was done intentionally. the robe is a custom item, and blessed. It must be removed from them upon resigning the guild, otherwise they must not be allowed to resign
Good morning typhoonbot, how are you today?

Hmm, although I see your ultimate goal here, I personally would go about this in a different way. I potentially see problems here. (for instance what if someone accidentally drops the robe to the ground and a griefer snatches it, they are stuck in the guild forever?)

What I would do is use a dictionary instead of a list. I would use a dictionary like this:

Code:
		public static Dictionary<Mobile, Item> m_UmbarianRooster = new Dictionary<Mobile, Item>();
Dictionaries work in a Key, Value relationship. They key is basically the ID for the entry, and the value is what it tied to that ID. You can make anything a key, and anything value (even say a list if items, so you can store an entire collection of items linked to one key, but thats off the subject).

The reason I suggest doing it this way is when a person is deleted or resigns from the guild you can alter the RemovePlayer method to look for that person in the dictionary, and if they are a guild member look at the item stored in their key, if that item exist (wasn't deleted) delete the item, then remove the player. Thsi way it doesn't matter where that robe is (locked in their house, stolen by a griefer, blasted into space for angry monkies to find as relics 3000 years in the future) it will get deleted as soon as the person leaves the guild.

It may sound intimidating but dictionaries are easy to work with once you get an understanding of them (which I can help you obtain). I will give you an example of how to serialize / deserialize this type of dictionary, as well as how to add a guild member and their robe to the dictionary. I will write something up now and post it in a few minutes.

p.s. I haven't had a chance to review your stone yet, I will do that in a few seconds, But Im happy to see you working away at it!
__________________
Father Time
Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "Holy Hell......What a ride!!!"

Server: UO: Extinction
ICQ: 146563794
FatherTime@UOExtinction.com
UO: Extinction homepage
UO: Extinction forum
vermillion2083 is offline   Reply With Quote