hpDec fix + Save quest expiration
Fixed an issue that would let a player to delay or anticipate the next map hpDec proc in certain conditions. Implemented mechanic that enables the DB save of expiration times for quests that needs this.
This commit is contained in:
@@ -63,7 +63,7 @@ public class MapleQuestStatus {
|
||||
private Map<Integer, String> progress = new LinkedHashMap<Integer, String>();
|
||||
private List<Integer> medalProgress = new LinkedList<Integer>();
|
||||
private int npc;
|
||||
private long completionTime;
|
||||
private long completionTime, expirationTime;
|
||||
private int forfeited = 0;
|
||||
private String customData;
|
||||
|
||||
@@ -71,6 +71,7 @@ public class MapleQuestStatus {
|
||||
this.questID = quest.getId();
|
||||
this.setStatus(status);
|
||||
this.completionTime = System.currentTimeMillis();
|
||||
this.expirationTime = 0;
|
||||
if (status == Status.STARTED)
|
||||
registerMobs();
|
||||
}
|
||||
@@ -80,6 +81,7 @@ public class MapleQuestStatus {
|
||||
this.setStatus(status);
|
||||
this.setNpc(npc);
|
||||
this.completionTime = System.currentTimeMillis();
|
||||
this.expirationTime = 0;
|
||||
if (status == Status.STARTED) {
|
||||
registerMobs();
|
||||
}
|
||||
@@ -89,9 +91,9 @@ public class MapleQuestStatus {
|
||||
return MapleQuest.getInstance(questID);
|
||||
}
|
||||
|
||||
public short getQuestID() {
|
||||
return questID;
|
||||
}
|
||||
public short getQuestID() {
|
||||
return questID;
|
||||
}
|
||||
|
||||
public Status getStatus() {
|
||||
return status;
|
||||
@@ -178,6 +180,14 @@ public class MapleQuestStatus {
|
||||
public void setCompletionTime(long completionTime) {
|
||||
this.completionTime = completionTime;
|
||||
}
|
||||
|
||||
public long getExpirationTime() {
|
||||
return expirationTime;
|
||||
}
|
||||
|
||||
public void setExpirationTime(long expirationTime) {
|
||||
this.expirationTime = expirationTime;
|
||||
}
|
||||
|
||||
public int getForfeited() {
|
||||
return forfeited;
|
||||
|
||||
Reference in New Issue
Block a user