Skip to content

Commit 2a6cc78

Browse files
matthewhillierReidWeb
authored andcommitted
Fixed some code review feedback:
- Removed the SB completion check - Removed extraneous SQL logging
1 parent fbbf021 commit 2a6cc78

File tree

4 files changed

+5
-41
lines changed

4 files changed

+5
-41
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Follow these steps to setup XIVStats-Gatherer-Java:
7575
|-d | --database | String | database name |
7676
|-D | --do-not-store-date | none | do not store date of last player activity |
7777
|-f | --finish | integer | the character id to conclude character run at (inclusive) |
78-
|-F | --print-failures | none | print records that don't exist |
78+
|-F | --print-failures | none | print records that don't exist |
7979
|-h | --help | none | display help message |
8080
|-m | --store-mounts | none | store mount data set for each player into the database |
8181
|-P | --store-minions | none | store minion data set for each player into the database |
@@ -188,9 +188,6 @@ The database table ```tblplayers``` has the following structure:
188188
|hw_complete |bit |Mount - Midgardsormr |
189189
|hw_31_complete |bit |Minion - Wind-up Haurchefant |
190190
|hw_33_complete |bit |Minion - Wind-up Aymeric |
191-
|sb_complete |bit |Minion - Ivon Coeurlfist Doll |
192-
| | |Minion - Dress-up Yugiri |
193-
| | |Wind-up Exdeath |
194191
|legacy_player |bit |Mount - Legacy Chocobo |
195192
|*mounts* |*text* |*N/A* |
196193
|*minions* |*text* |*N/A* |

src/main/java/com/ffxivcensus/gatherer/GathererController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ private void createTable(String tableName) {
357357
sbSQL.append("topazcarubuncleplush BIT,emeraldcarbuncleplush BIT,");
358358
sbSQL.append("hildibrand BIT, dideternalbond BIT, arrcollector BIT,");
359359
sbSQL.append("kobold BIT, sahagin BIT, amaljaa BIT, sylph BIT, moogle BIT, vanuvanu BIT, vath BIT,");
360-
sbSQL.append("arr_25_complete BIT,hw_complete BIT, hw_31_complete BIT, hw_33_complete BIT, sb_complete BIT, legacy_player BIT");
360+
sbSQL.append("arr_25_complete BIT,hw_complete BIT, hw_31_complete BIT, hw_33_complete BIT, legacy_player BIT");
361361
}
362362
if (this.storeMounts) {
363363
sbSQL.append(",mounts TEXT");
@@ -534,13 +534,13 @@ protected String writeToDB(Player player) {
534534
+ player.getBitHasEmeraldCarbunclePlush() + ",");
535535

536536
sbFields.append("hildibrand, ps4collectors, dideternalbond, arrcollector, kobold, sahagin, amaljaa, "
537-
+ "sylph, moogle, vanuvanu, vath, hw_complete, hw_31_complete, hw_33_complete, sb_complete, legacy_player");
537+
+ "sylph, moogle, vanuvanu, vath, hw_complete, hw_31_complete, hw_33_complete, legacy_player");
538538
sbValues.append(player.getBitHasCompletedHildibrand() + "," + player.getBitHasPS4Collectors() + ","
539539
+ player.getBitHasEternalBond() + "," + player.getBitHasARRCollectors() + ","
540540
+ player.getBitHasKobold() + "," + player.getBitHasSahagin() + "," + player.getBitHasAmaljaa() + ","
541541
+ player.getBitHasSylph() + "," + player.getBitHasMoogle() + "," + player.getBitHasVanuVanu() + ","
542542
+ player.getBitHasVath() + "," + player.getBitHasCompletedHW() + ","
543-
+ player.getBitHasCompleted3pt1() + "," + player.getBitHasCompleted3pt3() + "," + player.getBitHasCompletedSB() +","
543+
+ player.getBitHasCompleted3pt1() + "," + player.getBitHasCompleted3pt3() + ","
544544
+ player.getBitIsLegacyPlayer());
545545

546546
}
@@ -581,7 +581,7 @@ protected String writeToDB(Player player) {
581581
sbValues.append(");");
582582

583583
String strSQL = sbFields.toString() + sbValues.toString();
584-
System.out.println(strSQL);
584+
585585
st.executeUpdate(strSQL);
586586
if(!this.quiet || this.isVerbose()) {
587587
strOut = "Character " + player.getId() + " written to database successfully.";

src/main/java/com/ffxivcensus/gatherer/Player.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public class Player {
107107
private boolean hasVanuVanu;
108108
private boolean hasVath;
109109
private boolean hasCompletedHW;
110-
private boolean hasCompletedSB;
111110
private boolean hasCompleted3pt1;
112111
private boolean hasCompleted3pt3;
113112
private boolean isLegacyPlayer;
@@ -1996,10 +1995,6 @@ public static Player getPlayer(int playerID, int attempt) throws Exception {
19961995
player.setHasVanuVanu(player.doesPlayerHaveMount("Sanuwa"));
19971996
player.setHasVath(player.doesPlayerHaveMount("Kongamato"));
19981997
player.setHasCompletedHW(player.doesPlayerHaveMount("Midgardsormr"));
1999-
// Main Scenario quest doesn't drop a minion, so instead assume players will at least play one of the Level 70 dungeons and eventually get the minion
2000-
player.setHasCompletedSB(player.doesPlayerHaveMinion("Ivon Coeurlfist Doll") ||
2001-
player.doesPlayerHaveMinion("Dress-up Yugiri") ||
2002-
player.doesPlayerHaveMinion("Wind-up Exdeath"));
20031998
player.setIsLegacyPlayer(player.doesPlayerHaveMount("Legacy Chocobo"));
20041999
player.setActive(player.isPlayerActiveInDateRange());
20052000
} catch (IOException ioEx) {
@@ -2519,28 +2514,4 @@ public int getBitHasPreOrderSB() {
25192514
public void setHasPreOrderSB(boolean hasPreOrderSB) {
25202515
this.hasPreOrderSB = hasPreOrderSB;
25212516
}
2522-
2523-
/**
2524-
* Get whether player has completed Stormblood.
2525-
* @return whether player has completed Stromblood.
2526-
*/
2527-
public boolean isHasCompletedSB() {
2528-
return hasCompletedSB;
2529-
}
2530-
2531-
/**
2532-
* Get whether player has completed Stormblood.
2533-
* @return whether player has completed Stromblood.
2534-
*/
2535-
public int getBitHasCompletedSB() {
2536-
return isHasCompletedSB() ? 1 : 0;
2537-
}
2538-
2539-
/**
2540-
* Set whether player has completed Stromblood.
2541-
* @param hasCompletedSB whether player has completed Stormblood.
2542-
*/
2543-
public void setHasCompletedSB(boolean hasCompletedSB) {
2544-
this.hasCompletedSB = hasCompletedSB;
2545-
}
25462517
}

src/test/java/com/ffxivcensus/gatherer/PlayerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ public void testGetPlayer() throws Exception {
143143
assertEquals(1, playerOne.getBitHasSylph());
144144
assertTrue(playerOne.isHasCompletedHW());
145145
assertEquals(1, playerOne.getBitHasCompletedHW());
146-
// Currently no way to definitively tell player has completed the SB Main Scenario
147-
// Currently assumes minion drop from Kugane, Temple of the Fist or Delta V4
148-
assertTrue(playerOne.isHasCompletedSB());
149-
assertEquals(1, playerOne.getBitHasCompletedSB());
150146
assertTrue(playerOne.isHasCompleted3pt1());
151147
assertEquals(1, playerOne.getBitHasCompleted3pt1());
152148
assertFalse(playerOne.getIsLegacyPlayer());

0 commit comments

Comments
 (0)