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

View File

@@ -30,6 +30,7 @@ import java.util.List;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
@@ -374,6 +375,16 @@ public final class Channel {
usedDojo &= mask;
if(party != null) dojoParty.remove(party.hashCode());
else if(dojoParty.containsValue(slot)) { // they left the dojo before completing it, no party there!
Set<Entry<Integer, Integer>> es = Collections.unmodifiableSet(dojoParty.entrySet());
for(Entry<Integer, Integer> e: es) {
if(e.getValue() == slot) {
dojoParty.remove(e.getKey());
break;
}
}
}
}
private int getDojoSlot(int dojoMapId) {
@@ -405,7 +416,7 @@ public final class Channel {
final int stage = (dojoMapId / 100) % 100;
if(stage <= dojoStage[slot]) return;
long clockTime = (stage > 36 ? 15 : stage / 6 + 5) * 60000;
long clockTime = (stage > 36 ? 15 : (stage / 6) + 5) * 60000;
this.dojoTask[slot] = TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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");