Elg'cahlxukuth
Traveler
Hi!
I'm reading the Fishing.cs file to get some knowledge about how fishing skill works. I can see that inside the Construct method of the Fishing class there is a code which generates a treasure chest of some level:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Max( 4, sos.Level ) ) );
I wonder if there should rather be:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, sos.Level ) ) );
The original code make no sense to me. I mean it is the same as just:
TreasureMapChest.Fill( chest, Math.Max( 4, sos.Level ) );
I suspect that the autor wanted to constrain the value of the Fill method parameter to be from 1 to 4.
It is hard for me to tell what values are proper here, as I have no idea of how exactly fishing skill should work.
It is in RunUO 2.2 and 2.0 (and maybe others).
Sorry for my english :-/ I hope it can be understood.
Regards, Darek
I'm reading the Fishing.cs file to get some knowledge about how fishing skill works. I can see that inside the Construct method of the Fishing class there is a code which generates a treasure chest of some level:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Max( 4, sos.Level ) ) );
I wonder if there should rather be:
TreasureMapChest.Fill( chest, Math.Max( 1, Math.Min( 4, sos.Level ) ) );
The original code make no sense to me. I mean it is the same as just:
TreasureMapChest.Fill( chest, Math.Max( 4, sos.Level ) );
I suspect that the autor wanted to constrain the value of the Fill method parameter to be from 1 to 4.
It is hard for me to tell what values are proper here, as I have no idea of how exactly fishing skill should work.
It is in RunUO 2.2 and 2.0 (and maybe others).
Sorry for my english :-/ I hope it can be understood.
Regards, Darek