FIXED Errors in Message in Bottle loot

Lokai

Neophyte III
Problem: According to online guides, Fish Heads show "Recovered from a shipwreck". In the code we are making them an "Item" rather than a "ShipwreckItem" which is causing them to not have that designation.

Solution: In Fishing.cs, around line 447, change this:

Code:
                                    if (ran < 0.05)
                                        preLoot = new YellowPolkaDotBikini();
                                    else if (ran < 0.25)
                                        preLoot = new ShipwreckedItem(list[Utility.RandomMinMax(3, 7)], dredge);
                                    else
                                        preLoot = new Item(list[Utility.Random(3)]);
                                    break;

to this:

Code:
                                    double ran = Utility.RandomDouble();

                                    if (ran < 0.05)
                                        preLoot = new YellowPolkaDotBikini();
                                    else if (ran < 0.25)
                                        preLoot = new ShipwreckedItem(list[Utility.RandomMinMax(3, 7)], dredge);
                                    else
                                        preLoot = new ShipwreckedItem(list[Utility.Random(3)], dredge);
                                    break;

Problem: Table Legs and Unfinished Drawers have no weight. They should weigh 1 stone.

Solution: In ShipwreckedItem.cs, line 21, change this:

Code:
            if (weight >= 255)
                weight = 1;

to this:

Code:
            if (weight >= 255 || weight <= 0)
                weight = 1;
 
  • Like
Reactions: Dan

Dan

Staff Member
Administrator
Game Master
Awesome thanks I'll get these changes in today.

Do you have a copy of the Uoguide link you used to get this information?
 
OP
Lokai

Lokai

Neophyte III
Also, VERY small thing. In the script Fishing.cs, Line 442, it shows a comment that says you can get "Ores"

That should read "Oars". The Item IDs are correct for the 2 types of Oars, left leaning and right leaning.
 

Dan

Staff Member
Administrator
Game Master
Problem: According to online guides, Fish Heads show "Recovered from a shipwreck". In the code we are making them an "Item" rather than a "ShipwreckItem" which is causing them to not have that designation.

Solution: In Fishing.cs, around line 447, change this:

Code:
                                    if (ran < 0.05)
                                        preLoot = new YellowPolkaDotBikini();
                                    else if (ran < 0.25)
                                        preLoot = new ShipwreckedItem(list[Utility.RandomMinMax(3, 7)], dredge);
                                    else
                                        preLoot = new Item(list[Utility.Random(3)]);
                                    break;

to this:

Code:
                                    double ran = Utility.RandomDouble();

                                    if (ran < 0.05)
                                        preLoot = new YellowPolkaDotBikini();
                                    else if (ran < 0.25)
                                        preLoot = new ShipwreckedItem(list[Utility.RandomMinMax(3, 7)], dredge);
                                    else
                                        preLoot = new ShipwreckedItem(list[Utility.Random(3)], dredge);
                                    break;

Problem: Table Legs and Unfinished Drawers have no weight. They should weigh 1 stone.

Solution: In ShipwreckedItem.cs, line 21, change this:

Code:
            if (weight >= 255)
                weight = 1;

to this:

Code:
            if (weight >= 255 || weight <= 0)
                weight = 1;
Are there any normal items, that this list creates, that should NOT have Shipwrecked applied to it?
 

Dan

Staff Member
Administrator
Game Master

Dan

Staff Member
Administrator
Game Master
These issues have been fixed.

@Lokai has been awarded 10 Sovereigns.

(Some of the older items, created by this system, will remained bugged. Enjoy your pre-patch items!)
 

PLAY NOW

Heritage

Address
play.trueuo.com
Port
2593
Uptime
1 hour
Players Online
6
Houses
851
Vendors
297
Gold
5,019,065,717gp
Top Bottom