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:
ronancpl
2017-04-25 11:55:44 -03:00
parent 828a8a02a2
commit 939b214fb5
66 changed files with 16104 additions and 44622 deletions

View File

@@ -56,7 +56,7 @@ public final class AdminCommandHandler extends AbstractMaplePacketHandler {
for (int z = 0; z < toSpawn.length; z++) {
int[] toSpawnChild = toSpawn[z];
if (Randomizer.nextInt(101) <= toSpawnChild[1]) {
c.getPlayer().getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition());
c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition());
}
}
c.announce(MaplePacketCreator.enableActions());
@@ -143,7 +143,7 @@ public final class AdminCommandHandler extends AbstractMaplePacketHandler {
int mobId = slea.readInt();
int quantity = slea.readInt();
for (int i = 0; i < quantity; i++) {
c.getPlayer().getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(mobId), c.getPlayer().getPosition());
c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), c.getPlayer().getPosition());
}
break;
case 0x18: // Maple & Mobhp

View File

@@ -55,7 +55,7 @@ public final class UseSummonBag extends AbstractMaplePacketHandler {
for (int z = 0; z < toSpawn.length; z++) {
int[] toSpawnChild = toSpawn[z];
if (Randomizer.nextInt(101) <= toSpawnChild[1]) {
c.getPlayer().getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition());
c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition());
}
}
}

View File

@@ -29,6 +29,7 @@ import java.util.List;
public class MapleParty {
private MaplePartyCharacter leader;
private List<MaplePartyCharacter> members = new LinkedList<MaplePartyCharacter>();
private List<MaplePartyCharacter> pqMembers = null;
private int id;
public MapleParty(int id, MaplePartyCharacter chrfor) {
@@ -74,6 +75,19 @@ public class MapleParty {
return Collections.unmodifiableList(members);
}
public List<MaplePartyCharacter> getPartyMembers() {
return members;
}
// used whenever entering PQs: will draw every party member that can attempt a target PQ while ingnoring those unfit.
public Collection<MaplePartyCharacter> getEligibleMembers() {
return Collections.unmodifiableList(pqMembers);
}
public void setEligibleMembers(List<MaplePartyCharacter> eliParty) {
pqMembers = eliParty;
}
public int getId() {
return id;
}
@@ -85,7 +99,7 @@ public class MapleParty {
public MaplePartyCharacter getLeader() {
return leader;
}
@Override
public int hashCode() {
final int prime = 31;

View File

@@ -79,6 +79,10 @@ public class MaplePartyCharacter {
public void setChannel(int channel) {
this.channel = channel;
}
public boolean isLeader() {
return getPlayer().isPartyLeader();
}
public boolean isOnline() {
return online;