mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 14:24:37 +01:00
Fix double welcome mail creation
This commit is contained in:
@@ -121,6 +121,7 @@ public class Player {
|
|||||||
@Setter private transient RogueInstance rogueInstance;
|
@Setter private transient RogueInstance rogueInstance;
|
||||||
|
|
||||||
// Etc
|
// Etc
|
||||||
|
private transient boolean isNew;
|
||||||
private transient boolean loggedIn;
|
private transient boolean loggedIn;
|
||||||
private transient boolean inAnchorRange;
|
private transient boolean inAnchorRange;
|
||||||
private transient int nextBattleId;
|
private transient int nextBattleId;
|
||||||
@@ -145,6 +146,7 @@ public class Player {
|
|||||||
this();
|
this();
|
||||||
this.session = session;
|
this.session = session;
|
||||||
this.accountUid = getAccount().getUid();
|
this.accountUid = getAccount().getUid();
|
||||||
|
this.isNew = true;
|
||||||
this.initUid();
|
this.initUid();
|
||||||
this.resetPosition();
|
this.resetPosition();
|
||||||
|
|
||||||
@@ -169,9 +171,6 @@ public class Player {
|
|||||||
this.addAvatar(avatar);
|
this.addAvatar(avatar);
|
||||||
this.getCurrentLineup().getAvatars().add(avatar.getAvatarId());
|
this.getCurrentLineup().getAvatars().add(avatar.getAvatarId());
|
||||||
this.getCurrentLineup().save();
|
this.getCurrentLineup().save();
|
||||||
|
|
||||||
// Welcome mail
|
|
||||||
this.getMailbox().sendWelcomeMail();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameServer getServer() {
|
public GameServer getServer() {
|
||||||
@@ -654,6 +653,11 @@ public class Player {
|
|||||||
this.enterScene(GameConstants.START_ENTRY_ID, 0, false);
|
this.enterScene(GameConstants.START_ENTRY_ID, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send welcome mail after we load managers from the database
|
||||||
|
if (this.isNew) {
|
||||||
|
this.getMailbox().sendWelcomeMail();
|
||||||
|
}
|
||||||
|
|
||||||
// Set logged in flag
|
// Set logged in flag
|
||||||
this.lastActiveTime = System.currentTimeMillis() / 1000;
|
this.lastActiveTime = System.currentTimeMillis() / 1000;
|
||||||
this.loggedIn = true;
|
this.loggedIn = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user