mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Account for unspecified durability, related to #65
This commit is contained in:
parent
8c858937d8
commit
fef92e2b30
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>2.9.5</version>
|
||||
<version>2.9.6</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -625,14 +625,16 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
||||
} else {
|
||||
two = 0;
|
||||
}
|
||||
if (one == two) {
|
||||
if (one == two) {
|
||||
int missing;
|
||||
LinkedList<Integer> elements;
|
||||
if (context.getSessionData(pref + CK.S_BREAK_DURABILITY) != null) {
|
||||
missing = one - ((List<Integer>) context.getSessionData(pref + CK.S_BREAK_DURABILITY)).size();
|
||||
elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_DURABILITY);
|
||||
} else {
|
||||
missing = one;
|
||||
elements = new LinkedList<Integer>();
|
||||
}
|
||||
LinkedList<Integer> elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_DURABILITY);
|
||||
for (int i = 0; i < missing; i++) {
|
||||
elements.add(0);
|
||||
}
|
||||
@ -842,12 +844,14 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
||||
}
|
||||
if (one == two) {
|
||||
int missing;
|
||||
LinkedList<Integer> elements;
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_DURABILITY) != null) {
|
||||
missing = one - ((List<Integer>) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY)).size();
|
||||
elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY);
|
||||
} else {
|
||||
missing = one;
|
||||
elements = new LinkedList<Integer>();
|
||||
}
|
||||
LinkedList<Integer> elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY);
|
||||
for (int i = 0; i < missing; i++) {
|
||||
elements.add(0);
|
||||
}
|
||||
@ -1057,12 +1061,14 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
||||
}
|
||||
if (one == two) {
|
||||
int missing;
|
||||
LinkedList<Integer> elements;
|
||||
if (context.getSessionData(pref + CK.S_PLACE_DURABILITY) != null) {
|
||||
missing = one - ((List<Integer>) context.getSessionData(pref + CK.S_PLACE_DURABILITY)).size();
|
||||
elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_DURABILITY);
|
||||
} else {
|
||||
missing = one;
|
||||
elements = new LinkedList<Integer>();
|
||||
}
|
||||
LinkedList<Integer> elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_DURABILITY);
|
||||
for (int i = 0; i < missing; i++) {
|
||||
elements.add(0);
|
||||
}
|
||||
@ -1272,12 +1278,14 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
||||
}
|
||||
if (one == two) {
|
||||
int missing;
|
||||
LinkedList<Integer> elements;
|
||||
if (context.getSessionData(pref + CK.S_USE_DURABILITY) != null) {
|
||||
missing = one - ((List<Integer>) context.getSessionData(pref + CK.S_USE_DURABILITY)).size();
|
||||
elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_DURABILITY);
|
||||
} else {
|
||||
missing = one;
|
||||
elements = new LinkedList<Integer>();
|
||||
}
|
||||
LinkedList<Integer> elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_DURABILITY);
|
||||
for (int i = 0; i < missing; i++) {
|
||||
elements.add(0);
|
||||
}
|
||||
@ -1487,12 +1495,14 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
||||
}
|
||||
if (one == two) {
|
||||
int missing;
|
||||
LinkedList<Integer> elements;
|
||||
if (context.getSessionData(pref + CK.S_CUT_DURABILITY) != null) {
|
||||
missing = one - ((List<Integer>) context.getSessionData(pref + CK.S_CUT_DURABILITY)).size();
|
||||
elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_DURABILITY);
|
||||
} else {
|
||||
missing = one;
|
||||
elements = new LinkedList<Integer>();
|
||||
}
|
||||
LinkedList<Integer> elements = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_DURABILITY);
|
||||
for (int i = 0; i < missing; i++) {
|
||||
elements.add(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user