New PQ: Boss Rush PQ + Ellin/PiratePQ bug fixes
Introducing Boss Rush PQ. Corrected a few issues regarding rewardings in PiratePQ and EllinPQ and implemented a standardized way to script PQs.
This commit is contained in:
@@ -92,7 +92,7 @@ public class ReactorActionManager extends AbstractPlayerInteraction {
|
||||
int range = maxMeso - minMeso;
|
||||
int displayDrop = (int) (Math.random() * range) + minMeso;
|
||||
int mesoDrop = (displayDrop * client.getWorldServer().getMesoRate());
|
||||
reactor.getMap().spawnMesoDrop(mesoDrop, dropPos, reactor, client.getPlayer(), false, (byte) 0);
|
||||
reactor.getMap().spawnMesoDrop(mesoDrop, dropPos, reactor, client.getPlayer(), false, (byte) 2);
|
||||
} else {
|
||||
Item drop;
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
@@ -129,7 +129,7 @@ public class ReactorActionManager extends AbstractPlayerInteraction {
|
||||
|
||||
private void spawnMonster(int id, int qty, Point pos) {
|
||||
for (int i = 0; i < qty; i++) {
|
||||
reactor.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(id), pos);
|
||||
reactor.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(id), pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,23 @@ public class ReactorScriptManager extends AbstractScriptManager {
|
||||
public synchronized static ReactorScriptManager getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void onHit(MapleClient c, MapleReactor reactor) {
|
||||
try {
|
||||
ReactorActionManager rm = new ReactorActionManager(c, reactor);
|
||||
Invocable iv = getInvocable("reactor/" + reactor.getId() + ".js", c);
|
||||
if (iv == null) {
|
||||
return;
|
||||
}
|
||||
engine.put("rm", rm);
|
||||
iv.invokeFunction("hit");
|
||||
} catch(final NoSuchMethodException e) {
|
||||
//do nothing, hit is OPTIONAL
|
||||
}
|
||||
catch (final ScriptException | NullPointerException e) {
|
||||
FilePrinter.printError(FilePrinter.REACTOR + reactor.getId() + ".txt", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void act(MapleClient c, MapleReactor reactor) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user