Courageous
Wanderer
Question about RunUO source...
The RunUO source is filled up with things like:
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
This is what a professional software person calls a "magic number," meaning a number that appears as is, by itself. Is there some particular reason that the RunUO team opted to inline all special codes as magic numbers, instead of creating a namespace that packaged all the special numbers into well-named variables within the namespace?
If ths were done, the equivalent line of code would be something like:
Caster.SendLocalizedMessage( TARGET_CANNOT_BE_SEEN );
This has the added advantage in that any global changes to any of these special numbers has a single point of control....
C//
The RunUO source is filled up with things like:
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
This is what a professional software person calls a "magic number," meaning a number that appears as is, by itself. Is there some particular reason that the RunUO team opted to inline all special codes as magic numbers, instead of creating a namespace that packaged all the special numbers into well-named variables within the namespace?
If ths were done, the equivalent line of code would be something like:
Caster.SendLocalizedMessage( TARGET_CANNOT_BE_SEEN );
This has the added advantage in that any global changes to any of these special numbers has a single point of control....
C//