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:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user