mirror of
https://github.com/Anime-Game-Servers/AGSLunarCore.git
synced 2024-11-30 07:40:49 +00:00
Fix double welcome mail creation
This commit is contained in:
parent
2af7059749
commit
af836cdee1
@ -121,6 +121,7 @@ public class Player {
|
||||
@Setter private transient RogueInstance rogueInstance;
|
||||
|
||||
// Etc
|
||||
private transient boolean isNew;
|
||||
private transient boolean loggedIn;
|
||||
private transient boolean inAnchorRange;
|
||||
private transient int nextBattleId;
|
||||
@ -145,6 +146,7 @@ public class Player {
|
||||
this();
|
||||
this.session = session;
|
||||
this.accountUid = getAccount().getUid();
|
||||
this.isNew = true;
|
||||
this.initUid();
|
||||
this.resetPosition();
|
||||
|
||||
@ -169,9 +171,6 @@ public class Player {
|
||||
this.addAvatar(avatar);
|
||||
this.getCurrentLineup().getAvatars().add(avatar.getAvatarId());
|
||||
this.getCurrentLineup().save();
|
||||
|
||||
// Welcome mail
|
||||
this.getMailbox().sendWelcomeMail();
|
||||
}
|
||||
|
||||
public GameServer getServer() {
|
||||
@ -654,6 +653,11 @@ public class Player {
|
||||
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
|
||||
this.lastActiveTime = System.currentTimeMillis() / 1000;
|
||||
this.loggedIn = true;
|
||||
|
Loading…
Reference in New Issue
Block a user