Rename and clean up MapleParty
This commit is contained in:
@@ -31,8 +31,8 @@ import constants.game.GameConstants;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.server.Server;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import scripting.event.EventInstanceManager;
|
||||
import scripting.event.EventManager;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
@@ -723,7 +723,7 @@ public class AbstractPlayerInteraction {
|
||||
return null;
|
||||
}
|
||||
|
||||
public MapleParty getParty() {
|
||||
public Party getParty() {
|
||||
return getPlayer().getParty();
|
||||
}
|
||||
|
||||
@@ -804,7 +804,7 @@ public class AbstractPlayerInteraction {
|
||||
//4 players = +10% bonus (110)
|
||||
//5 players = +20% bonus (120)
|
||||
//6 players = +30% bonus (130)
|
||||
MapleParty party = getPlayer().getParty();
|
||||
Party party = getPlayer().getParty();
|
||||
int size = party.getMembers().size();
|
||||
|
||||
if(instance) {
|
||||
|
||||
@@ -32,8 +32,8 @@ import net.server.audit.locks.factory.MonitoredReadLockFactory;
|
||||
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
||||
import net.server.audit.locks.factory.MonitoredWriteLockFactory;
|
||||
import net.server.coordinator.world.EventRecallCoordinator;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
import scripting.event.scheduler.EventScriptScheduler;
|
||||
import server.MapleItemInformationProvider;
|
||||
@@ -350,7 +350,7 @@ public class EventInstanceManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void registerParty(MapleParty party, MapleMap map) {
|
||||
public void registerParty(Party party, MapleMap map) {
|
||||
for (MaplePartyCharacter mpc : party.getEligibleMembers()) {
|
||||
if (mpc.isOnline()) { // thanks resinate
|
||||
Character chr = map.getCharacterById(mpc.getId());
|
||||
|
||||
@@ -31,8 +31,8 @@ import net.server.audit.locks.MonitoredReentrantLock;
|
||||
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
||||
import net.server.channel.Channel;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.World;
|
||||
import scripting.event.scheduler.EventScriptScheduler;
|
||||
import server.MapleMarriage;
|
||||
@@ -507,15 +507,15 @@ public class EventManager {
|
||||
}
|
||||
|
||||
//PQ method: starts a PQ
|
||||
public boolean startInstance(MapleParty party, MapleMap map) {
|
||||
public boolean startInstance(Party party, MapleMap map) {
|
||||
return startInstance(-1, party, map);
|
||||
}
|
||||
|
||||
public boolean startInstance(int lobbyId, MapleParty party, MapleMap map) {
|
||||
public boolean startInstance(int lobbyId, Party party, MapleMap map) {
|
||||
return startInstance(lobbyId, party, map, party.getLeader().getPlayer());
|
||||
}
|
||||
|
||||
public boolean startInstance(int lobbyId, MapleParty party, MapleMap map, Character leader) {
|
||||
public boolean startInstance(int lobbyId, Party party, MapleMap map, Character leader) {
|
||||
if (this.isDisposed()) return false;
|
||||
|
||||
try {
|
||||
@@ -574,15 +574,15 @@ public class EventManager {
|
||||
}
|
||||
|
||||
//PQ method: starts a PQ with a difficulty level, requires function setup(difficulty, leaderid) instead of setup()
|
||||
public boolean startInstance(MapleParty party, MapleMap map, int difficulty) {
|
||||
public boolean startInstance(Party party, MapleMap map, int difficulty) {
|
||||
return startInstance(-1, party, map, difficulty);
|
||||
}
|
||||
|
||||
public boolean startInstance(int lobbyId, MapleParty party, MapleMap map, int difficulty) {
|
||||
public boolean startInstance(int lobbyId, Party party, MapleMap map, int difficulty) {
|
||||
return startInstance(lobbyId, party, map, difficulty, party.getLeader().getPlayer());
|
||||
}
|
||||
|
||||
public boolean startInstance(int lobbyId, MapleParty party, MapleMap map, int difficulty, Character leader) {
|
||||
public boolean startInstance(int lobbyId, Party party, MapleMap map, int difficulty, Character leader) {
|
||||
if (this.isDisposed()) return false;
|
||||
|
||||
try {
|
||||
@@ -702,7 +702,7 @@ public class EventManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<MaplePartyCharacter> getEligibleParty(MapleParty party) {
|
||||
public List<MaplePartyCharacter> getEligibleParty(Party party) {
|
||||
if (party == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ import net.server.coordinator.matchchecker.MatchCheckerListenerFactory.MatchChec
|
||||
import net.server.guild.Alliance;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.guild.GuildPackets;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataProviderFactory;
|
||||
import provider.wz.WZFiles;
|
||||
@@ -327,7 +327,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapleParty getParty() {
|
||||
public Party getParty() {
|
||||
return getPlayer().getParty();
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
public boolean createPyramid(String mode, boolean party) {//lol
|
||||
PyramidMode mod = PyramidMode.valueOf(mode);
|
||||
|
||||
MapleParty partyz = getPlayer().getParty();
|
||||
Party partyz = getPlayer().getParty();
|
||||
MapleMapManager mapManager = c.getChannelServer().getMapFactory();
|
||||
|
||||
MapleMap map = null;
|
||||
@@ -522,7 +522,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
if (!party) {
|
||||
partyz = new MapleParty(-1, new MaplePartyCharacter(getPlayer()));
|
||||
partyz = new Party(-1, new MaplePartyCharacter(getPlayer()));
|
||||
}
|
||||
Pyramid py = new Pyramid(partyz, mod, map.getId());
|
||||
getPlayer().setPartyQuest(py);
|
||||
@@ -714,7 +714,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
}
|
||||
|
||||
private int isCPQParty(MapleMap lobby, MapleParty party) {
|
||||
private int isCPQParty(MapleMap lobby, Party party) {
|
||||
int cpqMinLvl, cpqMaxLvl;
|
||||
|
||||
if (lobby.isCPQLobby()) {
|
||||
@@ -739,7 +739,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int canStartCPQ(MapleMap lobby, MapleParty party, MapleParty challenger) {
|
||||
private int canStartCPQ(MapleMap lobby, Party party, Party challenger) {
|
||||
int ret = isCPQParty(lobby, party);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
@@ -800,7 +800,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return;
|
||||
}
|
||||
|
||||
MapleParty lobbyParty = getPlayer().getParty(), challengerParty = challenger.getParty();
|
||||
Party lobbyParty = getPlayer().getParty(), challengerParty = challenger.getParty();
|
||||
int status = canStartCPQ(lobbyMap, lobbyParty, challengerParty);
|
||||
if (status == 0) {
|
||||
new MonsterCarnival(lobbyParty, challengerParty, mapid, true, (field / 100) % 10);
|
||||
@@ -852,7 +852,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return;
|
||||
}
|
||||
|
||||
MapleParty lobbyParty = getPlayer().getParty(), challengerParty = challenger.getParty();
|
||||
Party lobbyParty = getPlayer().getParty(), challengerParty = challenger.getParty();
|
||||
int status = canStartCPQ(lobbyMap, lobbyParty, challengerParty);
|
||||
if (status == 0) {
|
||||
new MonsterCarnival(lobbyParty, challengerParty, mapid, false, (field / 1000) % 10);
|
||||
|
||||
Reference in New Issue
Block a user