MagatiaPQ + several minor fixes

Added MagatiaPQ. Fixed a bug on Dojo where parties quitting the boss
fight without completing until rest point couldn't not start Dojo again
w/o reforming the party. Fixed issues with 2nd job NPC scripts. Reverted
command layout to use "!" and "@" again.
This commit is contained in:
ronancpl
2017-08-11 12:41:35 -03:00
parent f78defec1f
commit e0a27e00ab
185 changed files with 3316 additions and 527 deletions
@@ -787,14 +787,14 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
hitDmgMax = 200000;
}
int maxWithCrit = hitDmgMax;
int maxWithCrit = hitDmgMax;
if(canCrit) // They can crit, so up the max.
maxWithCrit *= 2;
// Warn if the damage is over 1.5x what we calculated above.
if(damage > maxWithCrit * 1.5) {
AutobanFactory.DAMAGE_HACK.alert(chr, "DMG: " + damage + " MaxDMG: " + maxWithCrit + " SID: " + ret.skill + " MobID: " + (monster != null ? monster.getId() : "null") + " Map: " + chr.getMap().getMapName() + " (" + chr.getMapId() + ")");
}
if(damage > maxWithCrit * 1.5) {
AutobanFactory.DAMAGE_HACK.alert(chr, "DMG: " + damage + " MaxDMG: " + maxWithCrit + " SID: " + ret.skill + " MobID: " + (monster != null ? monster.getId() : "null") + " Map: " + chr.getMap().getMapName() + " (" + chr.getMapId() + ")");
}
// Add a ab point if its over 5x what we calculated.
if(damage > maxWithCrit * 5) {
@@ -47,7 +47,7 @@ public final class GeneralChatHandler extends net.AbstractMaplePacketHandler {
return;
}
char heading = s.charAt(0);
if (heading == '/') {
if (heading == '!' || heading == '@') { // client seems to not send command with '/' heading to the server, if not a GM account
String[] sp = s.split(" ");
sp[0] = sp[0].toLowerCase().substring(1);
@@ -58,6 +58,12 @@ public final class MobDamageMobFriendlyHandler extends AbstractMaplePacketHandle
else if(monster.getId() == 9300093) { //tylus
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Tylus has fallen by the overwhelming forces of this ambush."));
}
else if(monster.getId() == 9300137) { //juliet
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Juliet has fainted on the middle of the combat."));
}
else if(monster.getId() == 9300138) { //romeo
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Romeo has fainted on the middle of the combat."));
}
c.getPlayer().getMap().killFriendlies(monster);
}
@@ -62,7 +62,7 @@ public final class NPCTalkHandler extends AbstractMaplePacketHandler {
// Custom handling for gachapon scripts to reduce the amount of scripts needed.
NPCScriptManager.getInstance().start(c, npc.getId(), "gachapon", null);
} else {
boolean hasNpcScript = NPCScriptManager.getInstance().start(c, npc.getId(), null);
boolean hasNpcScript = NPCScriptManager.getInstance().start(c, npc.getId(), oid, null);
if (!hasNpcScript) {
if (!npc.hasShop()) {
FilePrinter.printError(FilePrinter.NPC_UNCODED, "NPC " + npc.getName() + "(" + npc.getId() + ") is not coded.\r\n");