Couple confirmation
Added couple vows confirmation before completing marriage and giving rings.
This commit is contained in:
@@ -65,6 +65,7 @@ function setup(level, lobbyid) {
|
|||||||
eim.setProperty("canJoin", "1");
|
eim.setProperty("canJoin", "1");
|
||||||
eim.setProperty("groomId", "0");
|
eim.setProperty("groomId", "0");
|
||||||
eim.setProperty("brideId", "0");
|
eim.setProperty("brideId", "0");
|
||||||
|
eim.setProperty("confirmedVows", "-1");
|
||||||
|
|
||||||
eim.getInstanceMap(680000400).resetPQ(level);
|
eim.getInstanceMap(680000400).resetPQ(level);
|
||||||
if(eventBoss) spawnCakeBoss(eim);
|
if(eventBoss) spawnCakeBoss(eim);
|
||||||
@@ -92,7 +93,7 @@ function playerEntry(eim, player) {
|
|||||||
|
|
||||||
function stopBlessings(eim) {
|
function stopBlessings(eim) {
|
||||||
var mapobj = eim.getMapInstance(entryMap + 10);
|
var mapobj = eim.getMapInstance(entryMap + 10);
|
||||||
mapobj.dropMessage(6, "Wedding Assistant: Alright, now the couple is preparing to make it official. Tighten your seatbelts!");
|
mapobj.dropMessage(6, "Wedding Assistant: Alright people, our couple are preparing their vows to each other right now.");
|
||||||
|
|
||||||
eim.setIntProperty("weddingStage", 2);
|
eim.setIntProperty("weddingStage", 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ function setup(level, lobbyid) {
|
|||||||
eim.setProperty("canJoin", "1");
|
eim.setProperty("canJoin", "1");
|
||||||
eim.setProperty("groomId", "0");
|
eim.setProperty("groomId", "0");
|
||||||
eim.setProperty("brideId", "0");
|
eim.setProperty("brideId", "0");
|
||||||
|
eim.setProperty("confirmedVows", "-1");
|
||||||
|
|
||||||
eim.getInstanceMap(680000400).resetPQ(level);
|
eim.getInstanceMap(680000400).resetPQ(level);
|
||||||
if(eventBoss) spawnCakeBoss(eim);
|
if(eventBoss) spawnCakeBoss(eim);
|
||||||
@@ -92,7 +93,7 @@ function playerEntry(eim, player) {
|
|||||||
|
|
||||||
function stopBlessings(eim) {
|
function stopBlessings(eim) {
|
||||||
var mapobj = eim.getMapInstance(entryMap + 10);
|
var mapobj = eim.getMapInstance(entryMap + 10);
|
||||||
mapobj.dropMessage(6, "Wedding Assistant: Alright, now the couple is preparing to make it official. Tighten your seatbelts!");
|
mapobj.dropMessage(6, "Wedding Assistant: Alright people, our couple are preparing their vows to each other right now.");
|
||||||
|
|
||||||
eim.setIntProperty("weddingStage", 2);
|
eim.setIntProperty("weddingStage", 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,6 +311,11 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case 0:
|
case 0:
|
||||||
|
var pid = eim.getIntProperty("confirmedVows");
|
||||||
|
if(pid != -1) {
|
||||||
|
if(pid == player.getId()) {
|
||||||
|
cm.sendOk("You have already confirmed your vows. All that is left is for your partner to confirm now.");
|
||||||
|
} else {
|
||||||
eim.setIntProperty("weddingStage", 3);
|
eim.setIntProperty("weddingStage", 3);
|
||||||
var cmPartner = partner.getClient().getAbstractPlayerInteraction();
|
var cmPartner = partner.getClient().getAbstractPlayerInteraction();
|
||||||
|
|
||||||
@@ -334,6 +339,12 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
cm.getMap().dropMessage(6, "High Priest John: By the power vested in me through the mighty Maple tree, I now pronounce you Husband and Wife. You may kiss the bride!");
|
cm.getMap().dropMessage(6, "High Priest John: By the power vested in me through the mighty Maple tree, I now pronounce you Husband and Wife. You may kiss the bride!");
|
||||||
eim.schedule("showMarriedMsg", 2 * 1000);
|
eim.schedule("showMarriedMsg", 2 * 1000);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
eim.setIntProperty("confirmedVows", player.getId());
|
||||||
|
mapobj.dropMessage(6, "Wedding Assistant: " + player.getName() + " has confirmed vows! Alright, one step away to make it official. Tighten your seatbelts!");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -1:
|
case -1:
|
||||||
|
|||||||
@@ -192,6 +192,11 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case 0:
|
case 0:
|
||||||
|
var pid = eim.getIntProperty("confirmedVows");
|
||||||
|
if(pid != -1) {
|
||||||
|
if(pid == player.getId()) {
|
||||||
|
cm.sendOk("You have already confirmed your vows. All that is left is for your partner to confirm now.");
|
||||||
|
} else {
|
||||||
eim.setIntProperty("weddingStage", 3);
|
eim.setIntProperty("weddingStage", 3);
|
||||||
var cmPartner = partner.getClient().getAbstractPlayerInteraction();
|
var cmPartner = partner.getClient().getAbstractPlayerInteraction();
|
||||||
|
|
||||||
@@ -215,6 +220,12 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
cm.getMap().dropMessage(6, "Wayne: I'll call it out right now, and it shall go on: you guys are the key of the other's lock, a lace of a pendant. That's it, snog yourselves!");
|
cm.getMap().dropMessage(6, "Wayne: I'll call it out right now, and it shall go on: you guys are the key of the other's lock, a lace of a pendant. That's it, snog yourselves!");
|
||||||
eim.schedule("showMarriedMsg", 2 * 1000);
|
eim.schedule("showMarriedMsg", 2 * 1000);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
eim.setIntProperty("confirmedVows", player.getId());
|
||||||
|
mapobj.dropMessage(6, "Wedding Assistant: " + player.getName() + " has confirmed vows! Alright, one step away to make it official. Tighten your seatbelts!");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -1:
|
case -1:
|
||||||
|
|||||||
@@ -252,11 +252,11 @@ public final class DueyHandler extends AbstractMaplePacketHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addMesoToDB(int mesos, String sName, int recipientID) {
|
private static void addMesoToDB(int mesos, String sName, int recipientID) {
|
||||||
addItemToDB(null, 1, mesos, sName, recipientID);
|
addItemToDB(null, 1, mesos, sName, recipientID);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addItemToDB(Item item, int quantity, int mesos, String sName, int recipientID) {
|
public static void addItemToDB(Item item, int quantity, int mesos, String sName, int recipientID) {
|
||||||
Connection con = null;
|
Connection con = null;
|
||||||
try {
|
try {
|
||||||
con = DatabaseConnection.getConnection();
|
con = DatabaseConnection.getConnection();
|
||||||
@@ -344,7 +344,7 @@ public final class DueyHandler extends AbstractMaplePacketHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCurrentDate() {
|
private static String getCurrentDate() {
|
||||||
String date = "";
|
String date = "";
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
int day = cal.get(Calendar.DATE) - 1; // instant duey ?
|
int day = cal.get(Calendar.DATE) - 1; // instant duey ?
|
||||||
@@ -373,7 +373,7 @@ public final class DueyHandler extends AbstractMaplePacketHandler {
|
|||||||
return fee;
|
return fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeItemFromDB(int packageid) {
|
private static void removeItemFromDB(int packageid) {
|
||||||
Connection con = null;
|
Connection con = null;
|
||||||
try {
|
try {
|
||||||
con = DatabaseConnection.getConnection();
|
con = DatabaseConnection.getConnection();
|
||||||
|
|||||||
Reference in New Issue
Block a user