Improved Mushroom Castle + Body Pressure patch

Improved the gameplay around the Mushroom Castle region.
Solved an issue with HP threshold on MoveLifeHandler.
Fixed Body Pressure being refreshed every time it hits a mob.
This commit is contained in:
ronancpl
2018-03-20 10:59:18 -03:00
parent ae147a5a9f
commit 97da2e2b5a
22 changed files with 530 additions and 39 deletions

View File

@@ -28,6 +28,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import scripting.AbstractPlayerInteraction;
import server.MaplePortal;
import server.quest.MapleQuest;
import tools.DatabaseConnection;
import tools.MaplePacketCreator;
@@ -80,7 +81,23 @@ public class PortalPlayerInteraction extends AbstractPlayerInteraction {
return getPlayer().getLevel() >= 30;
}
public boolean forceStartQuest(int id) {
return forceStartQuest(id, 9010000);
}
public boolean forceStartQuest(int id, int npc) {
return MapleQuest.getInstance(id).forceStart(getPlayer(), npc);
}
public boolean forceCompleteQuest(int id) {
return forceCompleteQuest(id, 9010000);
}
public boolean forceCompleteQuest(int id, int npc) {
return MapleQuest.getInstance(id).forceComplete(getPlayer(), npc);
}
public void blockPortal() {
c.getPlayer().blockPortal(getPortal().getScriptName());
}

View File

@@ -162,4 +162,9 @@ public class QuestScriptManager extends AbstractScriptManager {
public QuestActionManager getQM(MapleClient c) {
return qms.get(c);
}
public void reloadQuestScripts() {
scripts.clear();
qms.clear();
}
}