Cleaned up more quest draft logic.

This commit is contained in:
Krazy
2014-07-12 19:49:34 +00:00
parent cbcd527dd5
commit a50fb330a2
2 changed files with 29 additions and 27 deletions

View File

@@ -127,7 +127,7 @@ public enum CSubmenuQuestDraft implements ICDoc {
}
}
String placement = QuestEventDraft.getPlacementString(draft.getPlayerPlacement());
String placement = draft.getPlacementString();
QuestEventDraft.QuestDraftPrizes prizes = draft.collectPrizes();

View File

@@ -627,6 +627,34 @@ public class QuestEventDraft {
return -1;
}
public String getPlacementString() {
int place = getPlayerPlacement();
String output;
switch (place) {
case 1:
output = "first";
break;
case 2:
output = "second";
break;
case 3:
output = "third";
break;
case 4:
output = "fourth";
break;
default:
output = "ERROR";
break;
}
return output;
}
public boolean canEnter() {
@@ -658,32 +686,6 @@ public class QuestEventDraft {
return title;
}
public static String getPlacementString(int place) {
String output;
switch (place) {
case 1:
output = "first";
break;
case 2:
output = "second";
break;
case 3:
output = "third";
break;
case 4:
output = "fourth";
break;
default:
output = "ERROR";
break;
}
return output;
}
/**
* Generates a random draft event based on the provided quest's limitations.
* Returns null in the event no draft could be created.