Merge pull request #5470 from ItsSebas/small-bugfixes

MTA: Fixed Alchemy, Worldmap: fixed quest location
This commit is contained in:
Abex
2018-09-13 13:24:24 -06:00
committed by GitHub
2 changed files with 8 additions and 9 deletions

View File

@@ -79,7 +79,9 @@ public class AlchemyRoom extends MTARoom
private static final int IMAGE_Z_OFFSET = 150;
private static final int NUM_CUPBOARDS = 8;
private static final int INFO_START = 5;
private static final int INFO_ITEM_START = 8;
private static final int INFO_POINT_START = 13;
private static final int INFO_LENGTH = 5;
private static final int BEST_POINTS = 30;
private static final String YOU_FOUND = "You found:";
@@ -286,19 +288,16 @@ public class AlchemyRoom extends MTARoom
private AlchemyItem getBest()
{
for (int i = 0; i < INFO_START; i++)
for (int i = 0; i < INFO_LENGTH; i++)
{
int index = i + INFO_START;
Widget textWidget = client.getWidget(WidgetID.MTA_ALCHEMY_GROUP_ID, index);
Widget textWidget = client.getWidget(WidgetID.MTA_ALCHEMY_GROUP_ID, INFO_ITEM_START + i);
if (textWidget == null)
{
return null;
}
String item = textWidget.getText().replace(":", "");
Widget pointsWidget = client.getWidget(WidgetID.MTA_ALCHEMY_GROUP_ID, index + INFO_START);
String item = textWidget.getText();
Widget pointsWidget = client.getWidget(WidgetID.MTA_ALCHEMY_GROUP_ID, INFO_POINT_START + i);
int points = Integer.parseInt(pointsWidget.getText());
if (points == BEST_POINTS)

View File

@@ -70,7 +70,7 @@ enum QuestStartLocation
DRAGON_SLAYER_II("Dragon Slayer II", new WorldPoint(2456, 2868, 0)),
DREAM_MENTOR("Dream Mentor", new WorldPoint(2144, 10346, 0)),
DRUIDIC_RITUAL("Druidic Ritual", new WorldPoint(2916, 3484, 0)),
DWARF_CANNON("Dwarf Cannon", new WorldPoint(2466, 3461, 0)),
DWARF_CANNON("Dwarf Cannon", new WorldPoint(2566, 3461, 0)),
EADGARS_RUSE("Eadgar's Ruse", new WorldPoint(2896, 3426, 0)),
EAGLES_PEAK("Eagles' Peak", new WorldPoint(2605, 3264, 0)),
ELEMENTAL_WORKSHOP("Elemental Workshop I & II", new WorldPoint(2714, 3482, 0)),