Peoharen

Member
So it's been forever since I did any real coding and worked in RunUO, so I need some reminders on things.

First thing, flags.
0x0 | 0x1 = 0x1
0x3 | 0x1 = 0x2
0x2 & 0x1 = 0x0
0x3 & 0x1 = 0x1

That look right or totally way off?
 
0x3 = 0011
0x1 = 0001

Using the or operator any bit that is set to 1 will always be a 1 in the final answer.

0011 | 0001 = 0011 = 0x3

Edit/ woops I read the original post wrong and fliped some things. Fixed now.
 
Last edited:
So last night I downloaded a copy of ServUO. Yeahee...

At a glance it looks like your using the Mal Ganisis Community Collections too, there is an exploit in the script that allows you to obtain infinite rewards. I can give you the details in a PM.
 
So last night I downloaded a copy of ServUO. Yeahee...

At a glance it looks like your using the Mal Ganisis Community Collections too, there is an exploit in the script that allows you to obtain infinite rewards. I can give you the details in a PM.

Sure thing, that would be great!
 
Sent.

You know, exploiting was how I came to know Tannis too. His wife ran around mortal with your typical noob GM gear of one-to-many zeros and I killed her after being on the shard for less than a week. She yelled for Tannis to come on and I proceeded to kill them both a few more times as I explained how I was doing it. Who knew murder made friends? :)
 
So there is no Map6 in the client directory and sure enough you just can't change your Map ID over to 6 and expect it to load up Eodon like every other map addition ever. So awkward question, how are you guys accessing the map?

And along that line, how come UOFiddler 4.6 doesn't show the dungeons and such on Tram/Fel?
Is this a uop break or someone arbitrarily limit Fiddler's map reading and I need a better version?
 
Eodon doesn't have a dedicated facet, it was placed in the black in termur. Go to coordinates around 600, 1700

If you want to see the extended maps in uofiddler you need to enable that option. New map size I believe it is called.
 
Ok so new problem, Enum.GetValues.

Basically I have a flagging style enumerable that I was using foreach( int i in Enum.GetValues( typeof( BlueSpells ) ) ) but like always I'm getting errors, typical indexoutofbounds for modifying or not lining up Sol/Luna/Jupiter/VY Canis Majoris in takes to get a foreach to actually work. So I want to move to for but I've having a new problem. Even through it's supposed to return an Array I cannot apply [] indexing to it.

eg.
Code:
Array array = Enum.GetValues( typeof( BlueSpells ) );
int zero = array[0];
Returns CS0021: Line 225: Cannot apply indexing with [] to an expression of type 'System.Array'

I feel like I'm missing something pretty obvious here.
 
Array is a base class and has no indexer. You need to specify the type you are expecting array to hold. So for example int[] array = ...
 
Code:
//using System.Linq;

foreach( BlueSpells entry in Enum.GetValues( typeof( BlueSpells ) ).Cast<BlueSpells>( ) )
{
}

Code:
//using System.Linq;

foreach( int entry in Enum.GetValues( typeof( BlueSpells ) ).Cast<int>( ) )
{
}

Code:
//using System.Linq;

BlueSpells[] array = Enum.GetValues( typeof( BlueSpells ) ).Cast<BlueSpells>( ).ToArray( );

Code:
//using System.Linq;

int[] array = Enum.GetValues( typeof( BlueSpells ) ).Cast<int>( ).ToArray( );

Code:
BlueSpells[] array = Enum.GetValues( typeof( BlueSpells ) ) as BlueSpells[];

Not recommended (due to potential type-casting inconsistencies at run-time):
Code:
int[] array = Enum.GetValues( typeof( BlueSpells ) ) as int[];

Raw conversion:
Code:
object[] array = Enum.GetValues( typeof( BlueSpells ) ) as object[];

Array is to object[] as ArrayList is to List<object>

It's probably also worth noting that Enum.GetValues and Enum.GetNames are intensive for what they do, so it's usually a good idea to cache the results (using your preferred method of casting);
Code:
private static object[] _BlueSpells = Enum.GetValues( typeof( BlueSpells ) ) as object[];
 
Array is a base class and has no indexer. You need to specify the type you are expecting array to hold. So for example int[] array = ...
I feel retarded, I knew it'd be something easy.

Code:
int[] array = (int[])Enum.GetValues( typeof( BlueSpells ) );
Is all it needed.
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back