Go Back   RunUO - Ultima Online Emulation > RunUO > Modification Suggestions

Modification Suggestions This is where you can suggest a modifcation to RunUO!

Reply
 
Thread Tools Display Modes
Old 09-17-2007, 04:07 AM   #1 (permalink)
Forum Novice
 
Join Date: Jul 2003
Posts: 158
Default [2.0 SVN 259] Error in Fishing.cs

I believe there's a minor mistake in Scripts\Engines\Harvest\Fishing.cs -
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Max( 4, sos.Level ) ) );

Should be:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, sos.Level ) ) );
panther is offline   Reply With Quote
Old 09-17-2007, 10:50 AM   #2 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,011
Send a message via Yahoo to Lord_Greywolf
Default

Quote:
Originally Posted by panther View Post
I believe there's a minor mistake in Scripts\Engines\Harvest\Fishing.cs -
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Max( 4, sos.Level ) ) );

Should be:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, sos.Level ) ) );

actualy your way also does nopt work either

in all cases - yours and theres - the only answer is 1 or 0 and with yours 1 only (yor min is always at least 4 and woth max of 1 = 1)

so they have something realy screwed up there with that formula
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 09-18-2007, 03:44 AM   #3 (permalink)
Forum Novice
 
Join Date: Jul 2003
Posts: 158
Default

Quote:
Originally Posted by Lord_Greywolf View Post
actualy your way also does nopt work either

in all cases - yours and theres - the only answer is 1 or 0 and with yours 1 only (yor min is always at least 4 and woth max of 1 = 1)

so they have something realy screwed up there with that formula
Seems fine to me.

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, sos.Level ) ) );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 0 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 0 ) );
TreasureMapChest.Fill( chest, 1 );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 1 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 1 ) );
TreasureMapChest.Fill( chest, 1 );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 2 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 2 ) );
TreasureMapChest.Fill( chest, 2 );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 3 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 3 ) );
TreasureMapChest.Fill( chest, 3 );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 4 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 4 ) );
TreasureMapChest.Fill( chest, 4 );

TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, 5 ) ) );
TreasureMapChest.Fill( chest, Math.Max( 1, 4 ) );
TreasureMapChest.Fill( chest, 4 );

This is the same formula they use in SOS.cs to set the level. Keeps the level in the range of 1-4.
panther 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