The great MCPQ Merge offensive

Fulfilled the lovely pull request #427 from @dragoso, which added in backing code content to HeavenMS.
Implemented structural changes for the Marriage wishlist, in order to receive, maintain and distribute gifts to spouses.
Added untradeable check on wishlist gift handler.
Adjusted CPQ drops to actually load from DB rathe than hard-coded.
Fixed CPQ "random disease to player/party" functionality not applying properly.
Adjusted how CPQ maps are generated. It directly loads a new area from WZ (this process should at least removes the player's spawned mobs) rather than reset the cache at every MCPQ creation.
This commit is contained in:
ronancpl
2019-03-15 12:08:21 -03:00
parent 1383efd6c3
commit 3bdf8cb2be
52 changed files with 2258 additions and 678 deletions

View File

@@ -1,5 +1,6 @@
package constants;
import client.MapleDisease;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
@@ -33,6 +34,9 @@ public class GameConstants {
private final static NumberFormat nfFormatter = new DecimalFormat("#,###,###,###");
private final static NumberFormat nfParser = NumberFormat.getInstance(ServerConstants.USE_UNITPRICE_WITH_COMMA ? Locale.FRANCE : Locale.UK);
public static final MapleDisease[] CPQ_DISEASES = {MapleDisease.SLOW, MapleDisease.SEDUCE, MapleDisease.STUN, MapleDisease.POISON,
MapleDisease.SEAL, MapleDisease.DARKNESS, MapleDisease.WEAKEN, MapleDisease.CURSE};
public static int getPlayerBonusDropRate(int slot) {
return(DROP_RATE_GAIN[slot]);
}

View File

@@ -0,0 +1,73 @@
package constants;
import client.MapleCharacter;
/**
*
* @author Drago - Dragohe4rt
*/
public class LanguageConstants {
// Portugues
public static String CPQAzul;
public static String CPQErro;
public static String CPQEntrada;
public static String CPQEscolha;
public static String CPQVermelho;
public static String CPQPlayerExit;
public static String CPQEntradaLobby;
public static String CPQInicioEscolha;
public static String CPQTempoExtendido;
public static String CPQLiderNaoEncontrado;
public static String CPQInicioEscolhaEmEscolha;
public static String CPQInicioEscolhaEnviada;
public static LanguageConstants Linguas(MapleCharacter chr) {
if (chr.getLingua() == 0) {
LanguageConstants.CPQAzul = "Maple Azul";
LanguageConstants.CPQVermelho = "Maple Vermelho";
LanguageConstants.CPQTempoExtendido = "O tempo foi estendido.";
LanguageConstants.CPQPlayerExit = " deixou o Carnaval de Monstros.";
LanguageConstants.CPQErro = "Ocorreu um problema. Favor recriar a sala.";
LanguageConstants.CPQLiderNaoEncontrado = "Nao foi possivel encontrar o Lider.";
LanguageConstants.CPQInicioEscolha = "Inscreva-se no Festival de Monstros!\\r\\n";
LanguageConstants.CPQInicioEscolhaEmEscolha = "O grupo esta respondendo um desafio no momento.";
LanguageConstants.CPQInicioEscolhaEnviada = "Um desafio foi enviado para o grupo na sala. Aguarde um momento.";
LanguageConstants.CPQEscolha = "Nao foi possivel encontrar um grupo nesta sala.\\r\\nProvavelmente o grupo foi desfeito dentro da sala!";
LanguageConstants.CPQEntradaLobby = "Agora voce ira receber desafios de outros grupos. Se voce nao aceitar um desafio em 3 minutos, voce sera levado para fora.";
LanguageConstants.CPQEntrada = "Voce pode selecionar \"Invocar Monstros\", \"Habilidade\", ou \"Protetor\" como sua tatica durante o Carnaval dos Monstros. Use Tab a F1~F12 para acesso rapido!";
} else if (chr.getLingua() == 1) {
LanguageConstants.CPQAzul = "Maple Azul";
LanguageConstants.CPQVermelho = "Maple Rojo";
LanguageConstants.CPQTempoExtendido = "El tiempo se ha ampliado.";
LanguageConstants.CPQPlayerExit = " ha dejado el Carnaval de Monstruos.";
LanguageConstants.CPQLiderNaoEncontrado = "No se pudo encontrar el Lider.";
LanguageConstants.CPQInicioEscolha = "!Inscribete en el Festival de Monstruos!\\r\\n";
LanguageConstants.CPQErro = "Se ha producido un problema. Por favor, volver a crear una sala.";
LanguageConstants.CPQInicioEscolhaEmEscolha = "El grupo esta respondiendo un desafio en el momento.";
LanguageConstants.CPQInicioEscolhaEnviada = "Un desafio fue enviado al grupo en la sala. Espera un momento.";
LanguageConstants.CPQEscolha = "No se pudo encontrar un grupo en esta sala.\\r\\nProbablemente el grupo fue deshecho dentro de la sala!";
LanguageConstants.CPQEntradaLobby = "Ahora usted recibira los retos de otros grupos. Si usted no acepta un desafio en 3 minutos, usted sera llevado hacia fuera.";
LanguageConstants.CPQEntrada = "Usted puede seleccionar \"Invocar Monstruos \", \"Habilidad \", o \"Protector \" como su tactica durante el Carnaval de los Monstruos. Utilice Tab y F1 ~ F12 para acceso rapido!";
} else if (chr.getLingua() == 2) {
LanguageConstants.CPQAzul = "Maple Blue";
LanguageConstants.CPQVermelho = "Maple Red";
LanguageConstants.CPQPlayerExit = " left the Carnival of Monsters.";
LanguageConstants.CPQTempoExtendido = "The time has been extended.";
LanguageConstants.CPQLiderNaoEncontrado = "Could not find the Leader.";
LanguageConstants.CPQErro = "There was a problem. Please re-create a room.";
LanguageConstants.CPQInicioEscolha = "Sign up for the Monster Festival!\\r\\n";
LanguageConstants.CPQInicioEscolhaEmEscolha = "The group is currently facing a challenge.";
LanguageConstants.CPQInicioEscolhaEnviada = "A challenge has been sent to the group in the room. Please wait a while.";
LanguageConstants.CPQEscolha = "We could not find a group in this room.\\r\\nProbably the group was scrapped inside the room!";
LanguageConstants.CPQEntradaLobby = "You will now receive challenges from other groups. If you do not accept a challenge within 3 minutes, you will be taken out.";
LanguageConstants.CPQEntrada = "You can select \"Summon Monsters \", \"Ability \", or \"Protector \" as your tactic during the Monster Carnival. Use Tab and F1 ~ F12 for quick access!";
}
return null;
}
}

View File

@@ -1,69 +0,0 @@
package constants;
import client.MapleCharacter;
/**
*
* @author Drago - Dragohe4rt
*/
public class LinguaConstants {
// Portugues
public static String CPQAzul;
public static String CPQErro;
public static String CPQEntrada;
public static String CPQEscolha;
public static String CPQVermelho;
public static String CPQPlayerExit;
public static String CPQEntradaLobby;
public static String CPQInicioEscolha;
public static String CPQTempoExtendido;
public static String CPQLiderNaoEncontrado;
public static String CPQInicioEscolhaEmEscolha;
public static LinguaConstants Linguas(MapleCharacter chr) {
if (chr.getLingua() == 0) {
LinguaConstants.CPQAzul = "Maple Azul";
LinguaConstants.CPQVermelho = "Maple Vermelho";
LinguaConstants.CPQTempoExtendido = "O tempo foi estendido.";
LinguaConstants.CPQPlayerExit = " deixou o Carnaval de Monstros.";
LinguaConstants.CPQErro = "Ocorreu um problema. Favor recriar a sala.";
LinguaConstants.CPQLiderNaoEncontrado = "Não foi possível encontrar o Lider.";
LinguaConstants.CPQInicioEscolha = "Inscreva-se no Festival de Monstros!\\r\\n";
LinguaConstants.CPQInicioEscolhaEmEscolha = "O grupo esta respondendo um desafio no momento.";
LinguaConstants.CPQEscolha = "Não foi possí­vel encontrar um grupo nesta sala.\\r\\nProvavelmente o grupo foi desfeito dentro da sala!";
LinguaConstants.CPQEntradaLobby = "[CPQ MapleStorySA] Agora você irá receber desafios de outros grupos. Se você não aceitar um desafio em 3 minutos, você será levado para fora.";
LinguaConstants.CPQEntrada = "Você pode selecionar \"Invocar Monstros\", \"Habilidade\", ou \"Protetor\" como sua tática durante o Carnaval dos Monstros. Use Tab a F1~F12 para acesso rápido!";
} else if (chr.getLingua() == 1) {
LinguaConstants.CPQAzul = "Maple Azul";
LinguaConstants.CPQVermelho = "Maple Rojo";
LinguaConstants.CPQTempoExtendido = "El tiempo se ha ampliado.";
LinguaConstants.CPQPlayerExit = " ha dejado el Carnaval de Monstruos.";
LinguaConstants.CPQLiderNaoEncontrado = "No se pudo encontrar el Lider.";
LinguaConstants.CPQInicioEscolha = "¡Inscríbete en el Festival de Monstruos!\\r\\n";
LinguaConstants.CPQErro = "Se ha producido un problema. Por favor, volver a crear una sala.";
LinguaConstants.CPQInicioEscolhaEmEscolha = "El grupo esta respondiendo un desafío en el momento.";
LinguaConstants.CPQEscolha = "No se pudo encontrar un grupo en esta sala.\\r\\nProbablemente el grupo fue deshecho dentro de la sala!";
LinguaConstants.CPQEntradaLobby = "[CPQ MapleStorySA] Ahora usted recibirá los retos de otros grupos. Si usted no acepta un desafío en 3 minutos, usted será llevado hacia fuera.";
LinguaConstants.CPQEntrada = "Usted puede seleccionar \"Invocar Monstruos \", \"Habilidad \", o \"Protector \" como su táctica durante el Carnaval de los Monstruos. Utilice Tab y F1 ~ F12 para acceso rápido!";
} else if (chr.getLingua() == 2) {
LinguaConstants.CPQAzul = "Maple Blue";
LinguaConstants.CPQVermelho = "Maple Red";
LinguaConstants.CPQPlayerExit = " left the Carnival of Monsters.";
LinguaConstants.CPQTempoExtendido = "The time has been extended.";
LinguaConstants.CPQLiderNaoEncontrado = "Could not find the Leader.";
LinguaConstants.CPQErro = "There was a problem. Please re-create a room.";
LinguaConstants.CPQInicioEscolha = "Sign up for the Monster Festival!\\r\\n";
LinguaConstants.CPQInicioEscolhaEmEscolha = "The group is currently facing a challenge.";
LinguaConstants.CPQEscolha = "We could not find a group in this room.\\r\\nProbably the group was scrapped inside the room!";
LinguaConstants.CPQEntradaLobby = "[CPQ MapleStorySA] You will now receive challenges from other groups. If you do not accept a challenge within 3 minutes, you will be taken out.";
LinguaConstants.CPQEntrada = "You can select \"Summon Monsters \", \"Ability \", or \"Protector \" as your tactic during the Monster Carnival. Use Tab and F1 ~ F12 for quick access!";
}
return null;
}
}

View File

@@ -34,7 +34,7 @@ public class ServerConstants {
public static final int BYPASS_PIC_EXPIRATION = 20; //Enables PIC bypass, which will remain active for that account by that client machine for N minutes. Set 0 to disable.
public static final int BYPASS_PIN_EXPIRATION = 15; //Enables PIN bypass, which will remain active for that account by that client machine for N minutes. Set 0 to disable.
public static final boolean AUTOMATIC_REGISTER = false; //Automatically register players when they login with a nonexistent username.
public static final boolean AUTOMATIC_REGISTER = true; //Automatically register players when they login with a nonexistent username.
public static final boolean BCRYPT_MIGRATION = true; //Performs a migration from old SHA-1 and SHA-512 password to bcrypt.
public static final boolean COLLECTIVE_CHARSLOT = false; //Available character slots are contabilized globally rather than per world server.
public static final boolean DETERRED_MULTICLIENT = false; //Enables multi-client and suspicious remote IP detection on the login system.
@@ -59,7 +59,7 @@ public class ServerConstants {
public static final boolean USE_CUSTOM_KEYSET = true; //Enables auto-setup of the HeavenMS's custom keybindings when creating characters.
public static final boolean USE_DEBUG = false; //Will enable some text prints on the client, oriented for debugging purposes.
public static final boolean USE_DEBUG_SHOW_INFO_EQPEXP = false; //Prints on the cmd all equip exp gain info.
public static boolean USE_DEBUG_SHOW_RCVD_PACKET = true; //Prints on the cmd all received packet ids.
public static boolean USE_DEBUG_SHOW_RCVD_PACKET = false; //Prints on the cmd all received packet ids.
public static boolean USE_DEBUG_SHOW_RCVD_MVLIFE = false; //Prints on the cmd all received move life content.
public static boolean USE_SUPPLY_RATE_COUPONS = true; //Allows rate coupons to be sold through the Cash Shop.
@@ -277,6 +277,7 @@ public class ServerConstants {
public static final int WEDDING_RESERVATION_TIMEOUT = 10; //Limit time in minutes for the couple to show up before cancelling the wedding reservation.
public static final int WEDDING_RESERVATION_INTERVAL = 60; //Time between wedding starts in minutes.
public static final int WEDDING_BLESS_EXP = 30000; //Exp gained per bless count.
public static final int WEDDING_GIFT_LIMIT = 1; //Max number of gifts per person to same wishlist on marriage instances.
public static final boolean WEDDING_BLESSER_SHOWFX = true; //Pops bubble sprite effect on players blessing the couple. Setting this false shows the blessing effect on the couple instead.
//Buyback Configuration