+Added stage start message

+Added stage complete message
This commit is contained in:
Zino 2013-08-03 21:51:14 +02:00
parent 9e79f98f95
commit b46aa5230f
9 changed files with 220 additions and 64 deletions

View File

@ -57,10 +57,15 @@ public class Quest {
// //
public void nextStage(Quester q){ public void nextStage(Quester q){
String stageCompleteMessage = q.currentStage.completeMessage;
if (stageCompleteMessage != null) {
q.getPlayer().sendMessage(Quests.parseString(stageCompleteMessage, q.currentQuest));
}
if(q.currentStage.delay < 0){ if(q.currentStage.delay < 0){
Player player = plugin.getServer().getPlayerExact(q.name); Player player = q.getPlayer();
if(stages.indexOf(q.currentStage) == (stages.size() - 1)){ if(stages.indexOf(q.currentStage) == (stages.size() - 1)){
@ -87,6 +92,11 @@ public class Quest {
player.sendMessage(s); player.sendMessage(s);
} }
String stageStartMessage = q.currentStage.startMessage;
if (stageStartMessage != null) {
q.getPlayer().sendMessage(Quests.parseString(stageStartMessage, q.currentQuest));
}
} }
@ -94,7 +104,6 @@ public class Quest {
q.delayTimeLeft = -1; q.delayTimeLeft = -1;
}else{ }else{
q.startStageTimer(); q.startStageTimer();
} }

View File

@ -1043,6 +1043,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
String event; String event;
Long delay; Long delay;
String delayMessage; String delayMessage;
String startMessage;
String completeMessage;
for (int i = 1; i <= StagesPrompt.getStages(cc); i++) { for (int i = 1; i <= StagesPrompt.getStages(cc); i++) {
@ -1103,7 +1105,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
event = null; event = null;
delay = null; delay = null;
delayMessage = null; delayMessage = null;
startMessage = null;
completeMessage = null;
if (cc.getSessionData(pref + CK.S_BREAK_IDS) != null) { if (cc.getSessionData(pref + CK.S_BREAK_IDS) != null) {
@ -1197,6 +1200,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
if (cc.getSessionData(pref + CK.S_DENIZEN) != null) { if (cc.getSessionData(pref + CK.S_DENIZEN) != null) {
script = (String) cc.getSessionData(pref + CK.S_DENIZEN); script = (String) cc.getSessionData(pref + CK.S_DENIZEN);
} }
if (cc.getSessionData(pref + CK.S_START_MESSAGE) != null) {
startMessage = (String) cc.getSessionData(pref + CK.S_START_MESSAGE);
}
if (cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE) != null) {
completeMessage = (String) cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE);
}
if (breakIds != null && breakIds.isEmpty() == false) { if (breakIds != null && breakIds.isEmpty() == false) {
stage.set("break-block-ids", breakIds); stage.set("break-block-ids", breakIds);
@ -1256,9 +1267,11 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
stage.set("sheep-to-shear", shearColors); stage.set("sheep-to-shear", shearColors);
stage.set("sheep-amounts", shearAmounts); stage.set("sheep-amounts", shearAmounts);
stage.set("script-to-run", script); stage.set("script-to-run", script);
stage.set(CK.S_EVENT, event); stage.set("event", event);
stage.set(CK.S_DELAY, delay); stage.set("delay", delay);
stage.set("delay-message", delayMessage); stage.set("delay-message", delayMessage);
stage.set("start-message", startMessage);
stage.set("complete-message", completeMessage);
} }
@ -1628,6 +1641,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
if (stage.script != null) { if (stage.script != null) {
cc.setSessionData(pref + CK.S_DENIZEN, stage.script); cc.setSessionData(pref + CK.S_DENIZEN, stage.script);
} }
if (stage.completeMessage != null) {
cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, stage.completeMessage);
}
if (stage.startMessage != null) {
cc.setSessionData(pref + CK.S_START_MESSAGE, stage.startMessage);
}
} }
// //

View File

@ -71,7 +71,7 @@ public class Quester {
public Player getPlayer() { public Player getPlayer() {
return plugin.getServer().getPlayer(name); return plugin.getServer().getPlayerExact(name);
} }
@ -100,6 +100,11 @@ public class Quester {
for (String s : getObjectives()) { for (String s : getObjectives()) {
player.sendMessage(s); player.sendMessage(s);
} }
String stageStartMessage = currentStage.startMessage;
if (stageStartMessage != null) {
getPlayer().sendMessage(Quests.parseString(stageStartMessage, currentQuest));
}
if(q.initialEvent != null) if(q.initialEvent != null)
q.initialEvent.happen(this); q.initialEvent.happen(this);

View File

@ -3253,6 +3253,18 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
stage.delayMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".delay-message"); stage.delayMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".delay-message");
} }
if (config.contains("quests." + s + ".stages.ordered." + s2 + ".start-message")) {
stage.startMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".start-message");
}
if (config.contains("quests." + s + ".stages.ordered." + s2 + ".complete-message")) {
stage.completeMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".complete-message");
}
stage.citizensToInteract = npcsToTalkTo; stage.citizensToInteract = npcsToTalkTo;

View File

@ -57,7 +57,7 @@ public class Stage {
}; };
ArrayList<String> deliverMessages = new ArrayList<String>(); ArrayList<String> deliverMessages = new ArrayList<String>();
LinkedList<NPC> citizensToInteract = new LinkedList<NPC>(){ public LinkedList<NPC> citizensToInteract = new LinkedList<NPC>(){
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
@ -81,7 +81,7 @@ public class Stage {
} }
}; };
LinkedList<NPC> citizensToKill = new LinkedList<NPC>() { public LinkedList<NPC> citizensToKill = new LinkedList<NPC>() {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
@ -105,22 +105,24 @@ public class Stage {
} }
}; };
LinkedList<Integer> citizenNumToKill = new LinkedList<Integer>(); public LinkedList<Integer> citizenNumToKill = new LinkedList<Integer>();
LinkedList<String> bossesToKill = new LinkedList<String>(); public LinkedList<String> bossesToKill = new LinkedList<String>();
LinkedList<Integer> bossAmountsToKill = new LinkedList<Integer>(); public LinkedList<Integer> bossAmountsToKill = new LinkedList<Integer>();
LinkedList<Location> locationsToReach = new LinkedList<Location>(); public LinkedList<Location> locationsToReach = new LinkedList<Location>();
LinkedList<Integer> radiiToReachWithin = new LinkedList<Integer>(); public LinkedList<Integer> radiiToReachWithin = new LinkedList<Integer>();
LinkedList<World> worldsToReachWithin = new LinkedList<World>(); public LinkedList<World> worldsToReachWithin = new LinkedList<World>();
LinkedList<String> locationNames = new LinkedList<String>(); public LinkedList<String> locationNames = new LinkedList<String>();
Map<EntityType, Integer> mobsToTame = new EnumMap<EntityType, Integer>(EntityType.class); public Map<EntityType, Integer> mobsToTame = new EnumMap<EntityType, Integer>(EntityType.class);
Map<DyeColor, Integer> sheepToShear = new EnumMap<DyeColor, Integer>(DyeColor.class); public Map<DyeColor, Integer> sheepToShear = new EnumMap<DyeColor, Integer>(DyeColor.class);
Map<EnumMap<Material, Integer>, Boolean> itemsToCraft = new HashMap<EnumMap<Material, Integer>, Boolean>(); public Map<EnumMap<Material, Integer>, Boolean> itemsToCraft = new HashMap<EnumMap<Material, Integer>, Boolean>();
String script; public String script;
Event event; public Event event;
long delay = -1; public long delay = -1;
String delayMessage = null; public String delayMessage = null;
public String completeMessage = null;
public String startMessage = null;
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
@ -285,6 +287,26 @@ public class Stage {
} else if (other.delayMessage == null && delayMessage != null) { } else if (other.delayMessage == null && delayMessage != null) {
return false; return false;
} }
if (other.startMessage != null && startMessage != null) {
if (other.startMessage.equals(startMessage) == false) {
return false;
}
} else if (other.startMessage != null && startMessage == null) {
return false;
} else if (other.startMessage == null && startMessage != null) {
return false;
}
if (other.completeMessage != null && completeMessage != null) {
if (other.completeMessage.equals(completeMessage) == false) {
return false;
}
} else if (other.completeMessage != null && completeMessage == null) {
return false;
} else if (other.completeMessage == null && completeMessage != null) {
return false;
}
} }

View File

@ -51,6 +51,11 @@ public class StageTimer implements Runnable{
player.sendMessage(s); player.sendMessage(s);
} }
String stageStartMessage = quester.currentStage.startMessage;
if (stageStartMessage != null) {
quester.getPlayer().sendMessage(Quests.parseString(stageStartMessage, quester.currentQuest));
}
} }

View File

@ -35,7 +35,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
public CreateStagePrompt(int stageNum, QuestFactory qf, CitizensPlugin cit) { public CreateStagePrompt(int stageNum, QuestFactory qf, CitizensPlugin cit) {
super("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"); super("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24");
this.stageNum = stageNum; this.stageNum = stageNum;
this.pref = "stage" + stageNum; this.pref = "stage" + stageNum;
this.citizens = cit; this.citizens = cit;
@ -340,9 +340,21 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
} }
} }
if (context.getSessionData(pref + CK.S_START_MESSAGE) == null) {
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Mmessage " + GRAY + " (" + Lang.get("noneSet") + ")\n";
} else {
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + GRAY + ")\n";
}
if (context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) == null) {
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + " (" + Lang.get("noneSet") + ")\n";
} else {
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + GRAY + ")\n";
}
text += RED + "" + BOLD + "21 " + RESET + PURPLE + "- Delete Stage\n"; text += RED + "" + BOLD + "23 " + RESET + PURPLE + "- Delete Stage\n";
text += GREEN + "" + BOLD + "22 " + RESET + PURPLE + "- Done\n"; text += GREEN + "" + BOLD + "24 " + RESET + PURPLE + "- Done\n";
return text; return text;
@ -422,8 +434,12 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
return new DenizenPrompt(); return new DenizenPrompt();
} }
} else if (input.equalsIgnoreCase("21")) { } else if (input.equalsIgnoreCase("21")) {
return new DeletePrompt(); return new StartMessagePrompt();
} else if (input.equalsIgnoreCase("22")) { } else if (input.equalsIgnoreCase("22")) {
return new CompleteMessagePrompt();
} else if (input.equalsIgnoreCase("23")) {
return new DeletePrompt();
} else if (input.equalsIgnoreCase("24")) {
return new StagesPrompt(questFactory); return new StagesPrompt(questFactory);
} else { } else {
return new CreateStagePrompt(stageNum, questFactory, citizens); return new CreateStagePrompt(stageNum, questFactory, citizens);
@ -3748,4 +3764,62 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
} }
} }
private class StartMessagePrompt extends StringPrompt {
@Override
public String getPromptText(ConversationContext context) {
return YELLOW + "Enter start message, or enter \"clear\" to clear the message, or \"cancel\" to return";
}
@Override
public Prompt acceptInput(ConversationContext context, String input) {
Player player = (Player) context.getForWhom();
if (input.equalsIgnoreCase("cancel") == false && input.equalsIgnoreCase("clear") == false) {
context.setSessionData(pref + CK.S_START_MESSAGE, input);
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else if (input.equalsIgnoreCase("clear")) {
context.setSessionData(pref + CK.S_START_MESSAGE, null);
player.sendMessage(YELLOW + "Start message cleared.");
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else {
return new StartMessagePrompt();
}
}
}
private class CompleteMessagePrompt extends StringPrompt {
@Override
public String getPromptText(ConversationContext context) {
return YELLOW + "Enter start message, or enter \"clear\" to clear the message, or \"cancel\" to return";
}
@Override
public Prompt acceptInput(ConversationContext context, String input) {
Player player = (Player) context.getForWhom();
if (input.equalsIgnoreCase("cancel") == false && input.equalsIgnoreCase("clear") == false) {
context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, input);
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else if (input.equalsIgnoreCase("clear")) {
context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, null);
player.sendMessage(YELLOW + "Complete message cleared.");
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else {
return new CompleteMessagePrompt();
}
}
}
} }

View File

@ -107,60 +107,63 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{
pref = "stage" + current; pref = "stage" + current;
newPref = "stage" + (current - 1); newPref = "stage" + (current - 1);
cc.setSessionData(newPref + "breakIds", cc.getSessionData(pref + CK.S_BREAK_IDS)); cc.setSessionData(newPref + CK.S_BREAK_IDS, cc.getSessionData(pref + CK.S_BREAK_IDS));
cc.setSessionData(newPref + "breakAmounts", cc.getSessionData(pref + CK.S_BREAK_AMOUNTS)); cc.setSessionData(newPref + CK.S_BREAK_AMOUNTS, cc.getSessionData(pref + CK.S_BREAK_AMOUNTS));
cc.setSessionData(newPref + "damageIds", cc.getSessionData(pref + CK.S_DAMAGE_IDS)); cc.setSessionData(newPref + CK.S_DAMAGE_IDS, cc.getSessionData(pref + CK.S_DAMAGE_IDS));
cc.setSessionData(newPref + "damageAmounts", cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS)); cc.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS));
cc.setSessionData(newPref + "placeIds", cc.getSessionData(pref + CK.S_PLACE_IDS)); cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_IDS));
cc.setSessionData(newPref + "placeAmounts", cc.getSessionData(pref + CK.S_PLACE_AMOUNTS)); cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_AMOUNTS));
cc.setSessionData(newPref + "useIds", cc.getSessionData(pref + CK.S_USE_IDS)); cc.setSessionData(newPref + CK.S_USE_IDS, cc.getSessionData(pref + CK.S_USE_IDS));
cc.setSessionData(newPref + "useAmounts", cc.getSessionData(pref + CK.S_USE_AMOUNTS)); cc.setSessionData(newPref + CK.S_USE_AMOUNTS, cc.getSessionData(pref + CK.S_USE_AMOUNTS));
cc.setSessionData(newPref + "cutIds", cc.getSessionData(pref + CK.S_CUT_IDS)); cc.setSessionData(newPref + CK.S_CUT_IDS, cc.getSessionData(pref + CK.S_CUT_IDS));
cc.setSessionData(newPref + "cutAmounts", cc.getSessionData(pref + CK.S_CUT_AMOUNTS)); cc.setSessionData(newPref + CK.S_CUT_AMOUNTS, cc.getSessionData(pref + CK.S_CUT_AMOUNTS));
cc.setSessionData(newPref + "fish", cc.getSessionData(pref + CK.S_FISH)); cc.setSessionData(newPref + CK.S_FISH, cc.getSessionData(pref + CK.S_FISH));
cc.setSessionData(newPref + "playerKill", cc.getSessionData(pref + CK.S_PLAYER_KILL)); cc.setSessionData(newPref + CK.S_PLAYER_KILL, cc.getSessionData(pref + CK.S_PLAYER_KILL));
cc.setSessionData(newPref + "enchantTypes", cc.getSessionData(pref + CK.S_ENCHANT_TYPES)); cc.setSessionData(newPref + CK.S_ENCHANT_TYPES, cc.getSessionData(pref + CK.S_ENCHANT_TYPES));
cc.setSessionData(newPref + "enchantIds", cc.getSessionData(pref + CK.S_ENCHANT_IDS)); cc.setSessionData(newPref + CK.S_ENCHANT_IDS, cc.getSessionData(pref + CK.S_ENCHANT_IDS));
cc.setSessionData(newPref + "enchantAmounts", cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS)); cc.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS));
cc.setSessionData(newPref + "deliveryItems", cc.getSessionData(pref + CK.S_DELIVERY_ITEMS)); cc.setSessionData(newPref + CK.S_DELIVERY_ITEMS, cc.getSessionData(pref + CK.S_DELIVERY_ITEMS));
cc.setSessionData(newPref + "deliveryNPCs", cc.getSessionData(pref + CK.S_DELIVERY_NPCS)); cc.setSessionData(newPref + CK.S_DELIVERY_NPCS, cc.getSessionData(pref + CK.S_DELIVERY_NPCS));
cc.setSessionData(newPref + "deliveryMessages", cc.getSessionData(pref + CK.S_DELIVERY_MESSAGES)); cc.setSessionData(newPref + CK.S_DELIVERY_MESSAGES, cc.getSessionData(pref + CK.S_DELIVERY_MESSAGES));
cc.setSessionData(newPref + "npcIdsToTalkTo", cc.getSessionData(pref + CK.S_NPCS_TO_TALK_TO)); cc.setSessionData(newPref + CK.S_NPCS_TO_TALK_TO, cc.getSessionData(pref + CK.S_NPCS_TO_TALK_TO));
cc.setSessionData(newPref + "npcIdsToKill", cc.getSessionData(pref + CK.S_NPCS_TO_KILL)); cc.setSessionData(newPref + CK.S_NPCS_TO_KILL, cc.getSessionData(pref + CK.S_NPCS_TO_KILL));
cc.setSessionData(newPref + "npcAmountsToKill", cc.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS)); cc.setSessionData(newPref + CK.S_NPCS_TO_KILL_AMOUNTS, cc.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS));
cc.setSessionData(newPref + "mobTypes", cc.getSessionData(pref + CK.S_MOB_TYPES)); cc.setSessionData(newPref + CK.S_MOB_TYPES, cc.getSessionData(pref + CK.S_MOB_TYPES));
cc.setSessionData(newPref + "mobAmounts", cc.getSessionData(pref + CK.S_MOB_AMOUNTS)); cc.setSessionData(newPref + CK.S_MOB_AMOUNTS, cc.getSessionData(pref + CK.S_MOB_AMOUNTS));
cc.setSessionData(newPref + "killLocations", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS)); cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS));
cc.setSessionData(newPref + "killLocationRadii", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS)); cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_RADIUS, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS));
cc.setSessionData(newPref + "killLocationNames", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES)); cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_NAMES, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES));
cc.setSessionData(newPref + "reachLocations", cc.getSessionData(pref + CK.S_REACH_LOCATIONS)); cc.setSessionData(newPref + CK.S_REACH_LOCATIONS, cc.getSessionData(pref + CK.S_REACH_LOCATIONS));
cc.setSessionData(newPref + "reachLocationRadii", cc.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS)); cc.setSessionData(newPref + CK.S_REACH_LOCATIONS_RADIUS, cc.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS));
cc.setSessionData(newPref + "reachLocationNames", cc.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES)); cc.setSessionData(newPref + CK.S_REACH_LOCATIONS_NAMES, cc.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES));
cc.setSessionData(newPref + "tameTypes", cc.getSessionData(pref + CK.S_TAME_TYPES)); cc.setSessionData(newPref + CK.S_TAME_TYPES, cc.getSessionData(pref + CK.S_TAME_TYPES));
cc.setSessionData(newPref + "tameAmounts", cc.getSessionData(pref + CK.S_TAME_AMOUNTS)); cc.setSessionData(newPref + CK.S_TAME_AMOUNTS, cc.getSessionData(pref + CK.S_TAME_AMOUNTS));
cc.setSessionData(newPref + "shearColors", cc.getSessionData(pref + CK.S_SHEAR_COLORS)); cc.setSessionData(newPref + CK.S_SHEAR_COLORS, cc.getSessionData(pref + CK.S_SHEAR_COLORS));
cc.setSessionData(newPref + "shearAmounts", cc.getSessionData(pref + CK.S_SHEAR_AMOUNTS)); cc.setSessionData(newPref + CK.S_SHEAR_AMOUNTS, cc.getSessionData(pref + CK.S_SHEAR_AMOUNTS));
cc.setSessionData(newPref + "event", cc.getSessionData(pref + CK.S_EVENT)); cc.setSessionData(newPref + CK.S_EVENT, cc.getSessionData(pref + CK.S_EVENT));
cc.setSessionData(newPref + "delay", cc.getSessionData(pref + CK.S_DELAY)); cc.setSessionData(newPref + CK.S_DELAY, cc.getSessionData(pref + CK.S_DELAY));
cc.setSessionData(newPref + "delayMessage", cc.getSessionData(pref + CK.S_DELAY_MESSAGE)); cc.setSessionData(newPref +CK.S_DELAY_MESSAGE, cc.getSessionData(pref + CK.S_DELAY_MESSAGE));
cc.setSessionData(newPref + "denizen", cc.getSessionData(pref + CK.S_DENIZEN)); cc.setSessionData(newPref + CK.S_DENIZEN, cc.getSessionData(pref + CK.S_DENIZEN));
cc.setSessionData(newPref + CK.S_COMPLETE_MESSAGE, cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE));
cc.setSessionData(newPref + CK.S_START_MESSAGE, cc.getSessionData(pref + CK.S_START_MESSAGE));
} }
@ -219,6 +222,9 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{
cc.setSessionData(pref + CK.S_DELAY_MESSAGE, null); cc.setSessionData(pref + CK.S_DELAY_MESSAGE, null);
cc.setSessionData(pref + CK.S_DENIZEN, null); cc.setSessionData(pref + CK.S_DENIZEN, null);
cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, null);
cc.setSessionData(pref + CK.S_START_MESSAGE, null);
if(last) if(last)
break; break;

View File

@ -77,6 +77,8 @@ public class CK {
public static String S_DELAY = "delay"; public static String S_DELAY = "delay";
public static String S_DELAY_MESSAGE = "delayMessage"; public static String S_DELAY_MESSAGE = "delayMessage";
public static String S_DENIZEN = "denizen"; public static String S_DENIZEN = "denizen";
public static String S_COMPLETE_MESSAGE = "completeMessage";
public static String S_START_MESSAGE = "startMessage";
//Events //Events
public static String E_OLD_EVENT = "oldEvent"; public static String E_OLD_EVENT = "oldEvent";