mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-08-20 19:52:45 +02:00
Removed old Session constructor usage from outside database
This commit is contained in:
parent
d65dd4ca16
commit
9241ef841f
|
@ -214,7 +214,7 @@ public abstract class Importer {
|
|||
int mobKills = userImportData.getMobKills();
|
||||
int deaths = userImportData.getDeaths();
|
||||
|
||||
Session session = new Session(0, 0L, 0L, mobKills, deaths);
|
||||
Session session = new Session(0, 0L, 0L, mobKills, deaths, 0);
|
||||
|
||||
session.setPlayerKills(userImportData.getKills());
|
||||
session.setWorldTimes(new WorldTimes(userImportData.getWorldTimes()));
|
||||
|
|
|
@ -44,9 +44,9 @@ public class PlayerProfileTest {
|
|||
int requiredLogins = Settings.ACTIVE_LOGIN_THRESHOLD.getNumber();
|
||||
|
||||
for (int i = 0; i < requiredLogins; i++) {
|
||||
sessions.add(new Session(0, weekAgo, weekAgo + requiredPlaytime * 4L, 0, 0));
|
||||
sessions.add(new Session(0, twoWeeksAgo, twoWeeksAgo + requiredPlaytime * 4L, 0, 0));
|
||||
sessions.add(new Session(0, threeWeeksAgo, threeWeeksAgo + requiredPlaytime * 4L, 0, 0));
|
||||
sessions.add(new Session(0, weekAgo, weekAgo + requiredPlaytime * 4L, 0, 0, 0));
|
||||
sessions.add(new Session(0, twoWeeksAgo, twoWeeksAgo + requiredPlaytime * 4L, 0, 0, 0));
|
||||
sessions.add(new Session(0, threeWeeksAgo, threeWeeksAgo + requiredPlaytime * 4L, 0, 0, 0));
|
||||
}
|
||||
p.setSessions(null, sessions);
|
||||
|
||||
|
@ -68,9 +68,9 @@ public class PlayerProfileTest {
|
|||
int requiredLogins = Settings.ACTIVE_LOGIN_THRESHOLD.getNumber();
|
||||
|
||||
for (int i = 0; i < requiredLogins * 2; i++) {
|
||||
sessions.add(new Session(0, weekAgo, weekAgo + requiredPlaytime * 3L, 0, 0));
|
||||
sessions.add(new Session(0, twoWeeksAgo, twoWeeksAgo + requiredPlaytime * 3L, 0, 0));
|
||||
sessions.add(new Session(0, threeWeeksAgo, threeWeeksAgo + requiredPlaytime * 3L, 0, 0));
|
||||
sessions.add(new Session(0, weekAgo, weekAgo + requiredPlaytime * 3L, 0, 0, 0));
|
||||
sessions.add(new Session(0, twoWeeksAgo, twoWeeksAgo + requiredPlaytime * 3L, 0, 0, 0));
|
||||
sessions.add(new Session(0, threeWeeksAgo, threeWeeksAgo + requiredPlaytime * 3L, 0, 0, 0));
|
||||
}
|
||||
p.setSessions(null, sessions);
|
||||
|
||||
|
@ -92,9 +92,9 @@ public class PlayerProfileTest {
|
|||
long requiredPlaytime = Settings.ACTIVE_PLAY_THRESHOLD.getNumber() * TimeAmount.MINUTE.ms() / requiredLogins;
|
||||
|
||||
for (int i = 0; i < requiredLogins; i++) {
|
||||
sessions.add(new Session(i, weekAgo, weekAgo + requiredPlaytime, 0, 0));
|
||||
sessions.add(new Session(i * 2, twoWeeksAgo, twoWeeksAgo + requiredPlaytime, 0, 0));
|
||||
sessions.add(new Session(i * 3, threeWeeksAgo, threeWeeksAgo + requiredPlaytime, 0, 0));
|
||||
sessions.add(new Session(i, weekAgo, weekAgo + requiredPlaytime, 0, 0, 0));
|
||||
sessions.add(new Session(i * 2, twoWeeksAgo, twoWeeksAgo + requiredPlaytime, 0, 0, 0));
|
||||
sessions.add(new Session(i * 3, threeWeeksAgo, threeWeeksAgo + requiredPlaytime, 0, 0, 0));
|
||||
}
|
||||
p.setSessions(null, sessions);
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class PlayerProfileTest {
|
|||
long date = 0;
|
||||
|
||||
for (int i = 0; i < 5000; i++) {
|
||||
sessions.add(new Session(0, 0, 0, 0, 0));
|
||||
sessions.add(new Session(0, 0, 0, 0, 0, 0));
|
||||
}
|
||||
p.setSessions(null, sessions);
|
||||
p.getActivityIndex(0);
|
||||
|
|
|
@ -797,7 +797,7 @@ public class SQLiteTest {
|
|||
WorldTimesTable worldTimesTable = db.getWorldTimesTable();
|
||||
worldTimesTable.saveWorldTimes(playerUUID, 1, worldTimes);
|
||||
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0);
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0, 0);
|
||||
Map<Integer, Session> sessions = new HashMap<>();
|
||||
sessions.put(1, session);
|
||||
worldTimesTable.addWorldTimesToSessions(playerUUID, sessions);
|
||||
|
@ -811,7 +811,7 @@ public class SQLiteTest {
|
|||
WorldTimes worldTimes = createWorldTimes();
|
||||
System.out.println(worldTimes);
|
||||
WorldTimesTable worldTimesTable = db.getWorldTimesTable();
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0);
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0, 0);
|
||||
session.setWorldTimes(worldTimes);
|
||||
|
||||
Map<UUID, Map<UUID, List<Session>>> map = new HashMap<>();
|
||||
|
@ -834,7 +834,7 @@ public class SQLiteTest {
|
|||
saveUserOne();
|
||||
WorldTimes worldTimes = createWorldTimes();
|
||||
System.out.println(worldTimes);
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0);
|
||||
Session session = new Session(1, 12345L, 23456L, 0, 0, 0);
|
||||
session.setWorldTimes(worldTimes);
|
||||
|
||||
Map<UUID, Map<UUID, List<Session>>> map = new HashMap<>();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class RandomData {
|
|||
public static List<Session> randomSessions() {
|
||||
List<Session> test = new ArrayList<>();
|
||||
for (int i = 0; i < 20; i++) {
|
||||
test.add(new Session(1, r.nextLong(), r.nextLong(), 0, 0));
|
||||
test.add(new Session(1, r.nextLong(), r.nextLong(), 0, 0, 0));
|
||||
}
|
||||
return test;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user