mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-28 03:01:59 +01:00
sorry but I undid the previous commit b/c of what i said in the comment
about supering.
This commit is contained in:
parent
7d911fe517
commit
9bcec74bfa
@ -42,6 +42,18 @@ public class Quester {
|
|||||||
public String questToTake;
|
public String questToTake;
|
||||||
public LinkedHashMap<Quest, Integer> currentQuests = new LinkedHashMap<Quest, Integer>() {
|
public LinkedHashMap<Quest, Integer> currentQuests = new LinkedHashMap<Quest, Integer>() {
|
||||||
|
|
||||||
|
public Integer hardRemove(Object key) {
|
||||||
|
return super.remove((Quest) key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void hardClear() {
|
||||||
|
super.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer hardPut(Quest key, Integer val) {
|
||||||
|
return super.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer put(Quest key, Integer val) {
|
public Integer put(Quest key, Integer val) {
|
||||||
Integer data = super.put(key, val);
|
Integer data = super.put(key, val);
|
||||||
@ -3373,9 +3385,10 @@ if (quest != null) {
|
|||||||
public void hardQuit(Quest quest) {
|
public void hardQuit(Quest quest) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
currentQuests.remove(quest);
|
currentQuests.getClass().getMethod("hardRemove", Object.class).invoke(currentQuests, quest);
|
||||||
questData.remove(quest);
|
questData.getClass().getMethod("hardRemove", Object.class).invoke(questData, quest);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, "ERROR FROM HARDQUIT ", ex);
|
||||||
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3384,10 +3397,11 @@ if (quest != null) {
|
|||||||
public void hardClear() {
|
public void hardClear() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
currentQuests.clear();
|
currentQuests.getClass().getMethod("hardClear", Object.class).invoke(currentQuests);
|
||||||
questData.clear();
|
questData.getClass().getMethod("hardClear", Object.class).invoke(questData);
|
||||||
amountsCompleted.clear();
|
amountsCompleted.getClass().getMethod("hardClear", Object.class).invoke(amountsCompleted);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, "ERROR FROM HARDCLEAR ", ex);
|
||||||
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3396,8 +3410,9 @@ if (quest != null) {
|
|||||||
public void hardStagePut(Quest key, Integer val) {
|
public void hardStagePut(Quest key, Integer val) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
currentQuests.put(key, val);
|
currentQuests.getClass().getMethod("hardPut", Quest.class, Integer.class).invoke(currentQuests, key, val);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, "ERROR FROM HARDSTAGEPUT ", ex);
|
||||||
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3406,9 +3421,10 @@ if (quest != null) {
|
|||||||
public void hardDataPut(Quest key, QuestData val) {
|
public void hardDataPut(Quest key, QuestData val) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
questData.put(key, val);
|
questData.getClass().getMethod("hardPut", Quest.class, QuestData.class).invoke(questData, key, val);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
|
Logger.getLogger(Quests.class.getName()).log(Level.SEVERE, "ERROR FROM HARDDATAPUT ", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user