Rename and clean up MapleParty
This commit is contained in:
@@ -36,8 +36,8 @@ import net.server.audit.locks.factory.MonitoredWriteLockFactory;
|
||||
import net.server.services.BaseService;
|
||||
import net.server.services.ServicesManager;
|
||||
import net.server.services.type.ChannelServices;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.World;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -317,7 +317,7 @@ public final class Channel {
|
||||
}
|
||||
}
|
||||
|
||||
public List<Character> getPartyMembers(MapleParty party) {
|
||||
public List<Character> getPartyMembers(Party party) {
|
||||
List<Character> partym = new ArrayList<>(8);
|
||||
for (MaplePartyCharacter partychar : party.getMembers()) {
|
||||
if (partychar.getChannel() == getId()) {
|
||||
@@ -465,7 +465,7 @@ public final class Channel {
|
||||
this.storedVars.put(key, val);
|
||||
}
|
||||
|
||||
public int lookupPartyDojo(MapleParty party) {
|
||||
public int lookupPartyDojo(Party party) {
|
||||
if(party == null) return -1;
|
||||
|
||||
Integer i = dojoParty.get(party.hashCode());
|
||||
@@ -476,7 +476,7 @@ public final class Channel {
|
||||
return ingressDojo(isPartyDojo, null, fromStage);
|
||||
}
|
||||
|
||||
public int ingressDojo(boolean isPartyDojo, MapleParty party, int fromStage) {
|
||||
public int ingressDojo(boolean isPartyDojo, Party party, int fromStage) {
|
||||
lock.lock();
|
||||
try {
|
||||
int dojoList = this.usedDojo;
|
||||
@@ -516,7 +516,7 @@ public final class Channel {
|
||||
}
|
||||
}
|
||||
|
||||
private void freeDojoSlot(int slot, MapleParty party) {
|
||||
private void freeDojoSlot(int slot, Party party) {
|
||||
int mask = 0b11111111111111111111;
|
||||
mask ^= (1 << slot);
|
||||
|
||||
@@ -594,7 +594,7 @@ public final class Channel {
|
||||
this.dojoTask[slot] = TimerManager.getInstance().schedule(() -> {
|
||||
final int delta = (dojoMapId) % 100;
|
||||
final int dojoBaseMap = (slot < 5) ? 925030000 : 925020000;
|
||||
MapleParty party = null;
|
||||
Party party = null;
|
||||
|
||||
for (int i = 0; i < 5; i++) { //only 32 stages, but 38 maps
|
||||
if (stage + i > 38) {
|
||||
@@ -619,7 +619,7 @@ public final class Channel {
|
||||
dojoFinishTime[slot] = Server.getInstance().getCurrentTime() + clockTime;
|
||||
}
|
||||
|
||||
public void dismissDojoSchedule(int dojoMapId, MapleParty party) {
|
||||
public void dismissDojoSchedule(int dojoMapId, Party party) {
|
||||
int slot = getDojoSlot(dojoMapId);
|
||||
int stage = (dojoMapId / 100) % 100;
|
||||
if(stage <= dojoStage[slot]) return;
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.server.guild.Alliance;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.guild.GuildPackets;
|
||||
import net.server.guild.GuildResponse;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.World;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -90,7 +90,7 @@ public final class GuildOperationHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!MapleParty.createParty(mc, true)) {
|
||||
if (!Party.createParty(mc, true)) {
|
||||
mc.dropMessage(1, "You cannot create a new Guild while in a party.");
|
||||
return;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ public final class GuildOperationHandler extends AbstractPacketHandler {
|
||||
if (leader != null) {
|
||||
int partyid = leader.getPartyId();
|
||||
if (partyid != -1) {
|
||||
MapleParty.joinParty(mc, partyid, true); // GMS gimmick "party to form guild" recalled thanks to Vcoc
|
||||
Party.joinParty(mc, partyid, true); // GMS gimmick "party to form guild" recalled thanks to Vcoc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ import client.Client;
|
||||
import client.Disease;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.MapleMonster;
|
||||
import server.partyquest.MapleCarnivalFactory;
|
||||
@@ -100,7 +100,7 @@ public final class MonsterCarnivalHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
final Disease dis = skill.getDisease();
|
||||
MapleParty enemies = c.getPlayer().getParty().getEnemy();
|
||||
Party enemies = c.getPlayer().getParty().getEnemy();
|
||||
if (skill.targetsAll) {
|
||||
int hitChance = 0;
|
||||
if (dis.getDisease() == 121 || dis.getDisease() == 122 || dis.getDisease() == 125 || dis.getDisease() == 126) {
|
||||
|
||||
@@ -30,8 +30,8 @@ import net.server.coordinator.world.InviteCoordinator;
|
||||
import net.server.coordinator.world.InviteCoordinator.InviteResult;
|
||||
import net.server.coordinator.world.InviteCoordinator.InviteType;
|
||||
import net.server.coordinator.world.InviteCoordinator.MapleInviteResult;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.PartyOperation;
|
||||
import net.server.world.World;
|
||||
import tools.PacketCreator;
|
||||
@@ -45,17 +45,17 @@ public final class PartyOperationHandler extends AbstractPacketHandler {
|
||||
int operation = p.readByte();
|
||||
Character player = c.getPlayer();
|
||||
World world = c.getWorldServer();
|
||||
MapleParty party = player.getParty();
|
||||
Party party = player.getParty();
|
||||
switch (operation) {
|
||||
case 1: { // create
|
||||
MapleParty.createParty(player, false);
|
||||
Party.createParty(player, false);
|
||||
break;
|
||||
}
|
||||
case 2: { // leave/disband
|
||||
if (party != null) {
|
||||
List<Character> partymembers = player.getPartyMembersOnline();
|
||||
|
||||
MapleParty.leaveParty(party, c);
|
||||
Party.leaveParty(party, c);
|
||||
player.updatePartySearchAvailability(true);
|
||||
player.partyOperationUpdate(party, partymembers);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public final class PartyOperationHandler extends AbstractPacketHandler {
|
||||
MapleInviteResult inviteRes = InviteCoordinator.answerInvite(InviteType.PARTY, player.getId(), partyid, true);
|
||||
InviteResult res = inviteRes.result;
|
||||
if (res == InviteResult.ACCEPTED) {
|
||||
MapleParty.joinParty(player, partyid, false);
|
||||
Party.joinParty(player, partyid, false);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.serverNotice(5, "You couldn't join the party due to an expired invitation request."));
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public final class PartyOperationHandler extends AbstractPacketHandler {
|
||||
|
||||
if (invited.getParty() == null) {
|
||||
if (party == null) {
|
||||
if (!MapleParty.createParty(player, false)) {
|
||||
if (!Party.createParty(player, false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class PartyOperationHandler extends AbstractPacketHandler {
|
||||
}
|
||||
case 5: { // expel
|
||||
int cid = p.readInt();
|
||||
MapleParty.expelFromParty(party, c, cid);
|
||||
Party.expelFromParty(party, c, cid);
|
||||
break;
|
||||
}
|
||||
case 6: { // change leader
|
||||
|
||||
@@ -25,7 +25,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.World;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PartySearchStartHandler extends AbstractPacketHandler {
|
||||
p.readInt(); // members
|
||||
int jobs = p.readInt();
|
||||
|
||||
MapleParty party = c.getPlayer().getParty();
|
||||
Party party = c.getPlayer().getParty();
|
||||
if (party == null || !c.getPlayer().isPartyLeader()) return;
|
||||
|
||||
World world = c.getWorldServer();
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.server.coordinator.matchchecker.MatchCheckerListenerRecipe;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.guild.GuildCharacter;
|
||||
import net.server.guild.GuildPackets;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.Party;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -157,7 +157,7 @@ public class MatchCheckerGuildCreation implements MatchCheckerListenerRecipe {
|
||||
public void onMatchDeclined(int leaderid, Set<Character> matchPlayers, String message) {
|
||||
for (Character chr : matchPlayers) {
|
||||
if (chr.getId() == leaderid && chr.getClient() != null) {
|
||||
MapleParty.leaveParty(chr.getParty(), chr.getClient());
|
||||
Party.leaveParty(chr.getParty(), chr.getClient());
|
||||
}
|
||||
|
||||
if (chr.isLoggedinWorld()) {
|
||||
@@ -186,7 +186,7 @@ public class MatchCheckerGuildCreation implements MatchCheckerListenerRecipe {
|
||||
|
||||
for (Character chr : matchPlayers) {
|
||||
if (chr.getId() == leaderid && chr.getClient() != null) {
|
||||
MapleParty.leaveParty(chr.getParty(), chr.getClient());
|
||||
Party.leaveParty(chr.getParty(), chr.getClient());
|
||||
}
|
||||
|
||||
if (chr.isLoggedinWorld()) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.server.audit.locks.factory.MonitoredReadLockFactory;
|
||||
import net.server.audit.locks.factory.MonitoredWriteLockFactory;
|
||||
import net.server.coordinator.world.InviteCoordinator;
|
||||
import net.server.coordinator.world.InviteCoordinator.InviteType;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.Party;
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataProviderFactory;
|
||||
import provider.MapleDataTool;
|
||||
@@ -392,7 +392,7 @@ public class PartySearchCoordinator {
|
||||
}
|
||||
|
||||
for (Character leader : searchedLeaders) {
|
||||
MapleParty party = leader.getParty();
|
||||
Party party = leader.getParty();
|
||||
if (party != null && party.getMembers().size() < 6) {
|
||||
addQueueLeader(leader);
|
||||
} else {
|
||||
|
||||
@@ -28,8 +28,8 @@ import net.server.Server;
|
||||
import net.server.coordinator.world.InviteCoordinator;
|
||||
import net.server.coordinator.world.InviteCoordinator.InviteType;
|
||||
import net.server.coordinator.world.InviteCoordinator.MapleInviteResult;
|
||||
import net.server.world.MapleParty;
|
||||
import net.server.world.MaplePartyCharacter;
|
||||
import net.server.world.Party;
|
||||
import tools.DatabaseConnection;
|
||||
|
||||
import java.sql.Connection;
|
||||
@@ -83,7 +83,7 @@ public class Alliance {
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Character> getPartyGuildMasters(MapleParty party) {
|
||||
private static List<Character> getPartyGuildMasters(Party party) {
|
||||
List<Character> mcl = new LinkedList<>();
|
||||
|
||||
for (MaplePartyCharacter mpc : party.getMembers()) {
|
||||
@@ -109,7 +109,7 @@ public class Alliance {
|
||||
return mcl;
|
||||
}
|
||||
|
||||
public static Alliance createAlliance(MapleParty party, String name) {
|
||||
public static Alliance createAlliance(Party party, String name) {
|
||||
List<Character> guildMasters = getPartyGuildMasters(party);
|
||||
if (guildMasters.size() != 2) {
|
||||
return null;
|
||||
|
||||
@@ -39,22 +39,22 @@ import tools.PacketCreator;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class MapleParty {
|
||||
public class Party {
|
||||
|
||||
private int id;
|
||||
private MapleParty enemy = null;
|
||||
private Party enemy = null;
|
||||
private int leaderId;
|
||||
private List<MaplePartyCharacter> members = new LinkedList<>();
|
||||
private final List<MaplePartyCharacter> members = new LinkedList<>();
|
||||
private List<MaplePartyCharacter> pqMembers = null;
|
||||
|
||||
private Map<Integer, Integer> histMembers = new HashMap<>();
|
||||
private final Map<Integer, Integer> histMembers = new HashMap<>();
|
||||
private int nextEntry = 0;
|
||||
|
||||
private Map<Integer, MapleDoor> doors = new HashMap<>();
|
||||
private final Map<Integer, MapleDoor> doors = new HashMap<>();
|
||||
|
||||
private MonitoredReentrantLock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.PARTY, true);
|
||||
|
||||
public MapleParty(int id, MaplePartyCharacter chrfor) {
|
||||
public Party(int id, MaplePartyCharacter chrfor) {
|
||||
this.leaderId = chrfor.getId();
|
||||
this.id = id;
|
||||
}
|
||||
@@ -139,18 +139,18 @@ public class MapleParty {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<MaplePartyCharacter> getPartyMembersOnline() {
|
||||
lock.lock();
|
||||
try {
|
||||
List<MaplePartyCharacter> ret = new LinkedList<>();
|
||||
|
||||
|
||||
for (MaplePartyCharacter mpc : members) {
|
||||
if (mpc.isOnline()) {
|
||||
ret.add(mpc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
} finally {
|
||||
lock.unlock();
|
||||
@@ -193,11 +193,11 @@ public class MapleParty {
|
||||
}
|
||||
}
|
||||
|
||||
public MapleParty getEnemy() {
|
||||
public Party getEnemy() {
|
||||
return enemy;
|
||||
}
|
||||
|
||||
public void setEnemy(MapleParty enemy) {
|
||||
public void setEnemy(Party enemy) {
|
||||
this.enemy = enemy;
|
||||
}
|
||||
|
||||
@@ -319,15 +319,12 @@ public class MapleParty {
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final MapleParty other = (MapleParty) obj;
|
||||
if (id != other.id) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
final Party other = (Party) obj;
|
||||
return id == other.id;
|
||||
}
|
||||
|
||||
|
||||
public static boolean createParty(Character player, boolean silentCheck) {
|
||||
MapleParty party = player.getParty();
|
||||
Party party = player.getParty();
|
||||
if (party == null) {
|
||||
if (player.getLevel() < 10 && !YamlConfig.config.server.USE_PARTY_FOR_STARTERS) {
|
||||
player.sendPacket(PacketCreator.partyStatusMessage(10));
|
||||
@@ -336,44 +333,44 @@ public class MapleParty {
|
||||
player.dropMessage(5, "You cannot request a party creation while participating the Ariant Battle Arena.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
MaplePartyCharacter partyplayer = new MaplePartyCharacter(player);
|
||||
party = player.getWorldServer().createParty(partyplayer);
|
||||
player.setParty(party);
|
||||
player.setMPC(partyplayer);
|
||||
player.getMap().addPartyMember(player, party.getId());
|
||||
player.silentPartyUpdate();
|
||||
|
||||
|
||||
player.updatePartySearchAvailability(false);
|
||||
player.partyOperationUpdate(party, null);
|
||||
|
||||
|
||||
player.sendPacket(PacketCreator.partyCreated(party, partyplayer.getId()));
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
if (!silentCheck) {
|
||||
player.sendPacket(PacketCreator.partyStatusMessage(16));
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean joinParty(Character player, int partyid, boolean silentCheck) {
|
||||
MapleParty party = player.getParty();
|
||||
Party party = player.getParty();
|
||||
World world = player.getWorldServer();
|
||||
|
||||
|
||||
if (party == null) {
|
||||
party = world.getParty(partyid);
|
||||
if (party != null) {
|
||||
if (party.getMembers().size() < 6) {
|
||||
MaplePartyCharacter partyplayer = new MaplePartyCharacter(player);
|
||||
player.getMap().addPartyMember(player, party.getId());
|
||||
|
||||
|
||||
world.updateParty(party.getId(), PartyOperation.JOIN, partyplayer);
|
||||
player.receivePartyMemberHP();
|
||||
player.updatePartyMemberHP();
|
||||
|
||||
|
||||
player.resetPartySearchInvite(party.getLeaderId());
|
||||
player.updatePartySearchAvailability(false);
|
||||
player.partyOperationUpdate(party, null);
|
||||
@@ -391,28 +388,28 @@ public class MapleParty {
|
||||
player.sendPacket(PacketCreator.serverNotice(5, "You can't join the party as you are already in one."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void leaveParty(MapleParty party, Client c) {
|
||||
|
||||
public static void leaveParty(Party party, Client c) {
|
||||
World world = c.getWorldServer();
|
||||
Character player = c.getPlayer();
|
||||
MaplePartyCharacter partyplayer = player.getMPC();
|
||||
|
||||
|
||||
if (party != null && partyplayer != null) {
|
||||
if (partyplayer.getId() == party.getLeaderId()) {
|
||||
c.getWorldServer().removeMapPartyMembers(party.getId());
|
||||
|
||||
|
||||
MonsterCarnival mcpq = player.getMonsterCarnival();
|
||||
if (mcpq != null) {
|
||||
mcpq.leftParty(player.getId());
|
||||
}
|
||||
|
||||
|
||||
world.updateParty(party.getId(), PartyOperation.DISBAND, partyplayer);
|
||||
|
||||
|
||||
EventInstanceManager eim = player.getEventInstance();
|
||||
if(eim != null) {
|
||||
if (eim != null) {
|
||||
eim.disbandParty();
|
||||
}
|
||||
} else {
|
||||
@@ -420,58 +417,60 @@ public class MapleParty {
|
||||
if (map != null) {
|
||||
map.removePartyMember(player, party.getId());
|
||||
}
|
||||
|
||||
|
||||
MonsterCarnival mcpq = player.getMonsterCarnival();
|
||||
if (mcpq != null) {
|
||||
mcpq.leftParty(player.getId());
|
||||
}
|
||||
|
||||
world.updateParty(party.getId(), PartyOperation.LEAVE, partyplayer);
|
||||
|
||||
|
||||
EventInstanceManager eim = player.getEventInstance();
|
||||
if(eim != null) {
|
||||
if (eim != null) {
|
||||
eim.leftParty(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
player.setParty(null);
|
||||
|
||||
|
||||
MatchCheckerCoordinator mmce = c.getWorldServer().getMatchCheckerCoordinator();
|
||||
if (mmce.getMatchConfirmationLeaderid(player.getId()) == player.getId() && mmce.getMatchConfirmationType(player.getId()) == MatchCheckerType.GUILD_CREATION) {
|
||||
mmce.dismissMatchConfirmation(player.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void expelFromParty(MapleParty party, Client c, int expelCid) {
|
||||
|
||||
public static void expelFromParty(Party party, Client c, int expelCid) {
|
||||
World world = c.getWorldServer();
|
||||
Character player = c.getPlayer();
|
||||
MaplePartyCharacter partyplayer = player.getMPC();
|
||||
|
||||
|
||||
if (party != null && partyplayer != null) {
|
||||
if (partyplayer.equals(party.getLeader())) {
|
||||
MaplePartyCharacter expelled = party.getMemberById(expelCid);
|
||||
if (expelled != null) {
|
||||
Character emc = expelled.getPlayer();
|
||||
if(emc != null) {
|
||||
if (emc != null) {
|
||||
List<Character> partyMembers = emc.getPartyMembersOnline();
|
||||
|
||||
MapleMap map = emc.getMap();
|
||||
if(map != null) map.removePartyMember(emc, party.getId());
|
||||
|
||||
if (map != null) {
|
||||
map.removePartyMember(emc, party.getId());
|
||||
}
|
||||
|
||||
MonsterCarnival mcpq = player.getMonsterCarnival();
|
||||
if (mcpq != null) {
|
||||
mcpq.leftParty(emc.getId());
|
||||
}
|
||||
|
||||
|
||||
EventInstanceManager eim = emc.getEventInstance();
|
||||
if(eim != null) {
|
||||
if (eim != null) {
|
||||
eim.leftParty(emc);
|
||||
}
|
||||
|
||||
emc.setParty(null);
|
||||
world.updateParty(party.getId(), PartyOperation.EXPEL, expelled);
|
||||
|
||||
|
||||
emc.updatePartySearchAvailability(true);
|
||||
emc.partyOperationUpdate(party, partyMembers);
|
||||
} else {
|
||||
@@ -104,7 +104,7 @@ public class World {
|
||||
private Map<Integer, Set<Integer>> marriageGuests = new ConcurrentHashMap<>();
|
||||
|
||||
private Map<Integer, Integer> partyChars = new HashMap<>();
|
||||
private Map<Integer, MapleParty> parties = new HashMap<>();
|
||||
private Map<Integer, Party> parties = new HashMap<>();
|
||||
private AtomicInteger runningPartyId = new AtomicInteger();
|
||||
private MonitoredReentrantLock partyLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.WORLD_PARTY, true);
|
||||
|
||||
@@ -838,9 +838,9 @@ public class World {
|
||||
}
|
||||
}
|
||||
|
||||
public MapleParty createParty(MaplePartyCharacter chrfor) {
|
||||
public Party createParty(MaplePartyCharacter chrfor) {
|
||||
int partyid = runningPartyId.getAndIncrement();
|
||||
MapleParty party = new MapleParty(partyid, chrfor);
|
||||
Party party = new Party(partyid, chrfor);
|
||||
|
||||
partyLock.lock();
|
||||
try {
|
||||
@@ -854,7 +854,7 @@ public class World {
|
||||
return party;
|
||||
}
|
||||
|
||||
public MapleParty getParty(int partyid) {
|
||||
public Party getParty(int partyid) {
|
||||
partyLock.lock();
|
||||
try {
|
||||
return parties.get(partyid);
|
||||
@@ -863,7 +863,7 @@ public class World {
|
||||
}
|
||||
}
|
||||
|
||||
private MapleParty disbandParty(int partyid) {
|
||||
private Party disbandParty(int partyid) {
|
||||
partyLock.lock();
|
||||
try {
|
||||
return parties.remove(partyid);
|
||||
@@ -872,7 +872,7 @@ public class World {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateCharacterParty(MapleParty party, PartyOperation operation, MaplePartyCharacter target, Collection<MaplePartyCharacter> partyMembers) {
|
||||
private void updateCharacterParty(Party party, PartyOperation operation, MaplePartyCharacter target, Collection<MaplePartyCharacter> partyMembers) {
|
||||
switch (operation) {
|
||||
case JOIN:
|
||||
registerCharacterParty(target.getId(), party.getId());
|
||||
@@ -899,7 +899,7 @@ public class World {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateParty(MapleParty party, PartyOperation operation, MaplePartyCharacter target) {
|
||||
private void updateParty(Party party, PartyOperation operation, MaplePartyCharacter target) {
|
||||
Collection<MaplePartyCharacter> partyMembers = party.getMembers();
|
||||
updateCharacterParty(party, operation, target, partyMembers);
|
||||
|
||||
@@ -931,7 +931,7 @@ public class World {
|
||||
}
|
||||
|
||||
public void updateParty(int partyid, PartyOperation operation, MaplePartyCharacter target) {
|
||||
MapleParty party = getParty(partyid);
|
||||
Party party = getParty(partyid);
|
||||
if (party == null) {
|
||||
throw new IllegalArgumentException("no party with the specified partyid exists");
|
||||
}
|
||||
@@ -979,7 +979,7 @@ public class World {
|
||||
}
|
||||
|
||||
public void removeMapPartyMembers(int partyid) {
|
||||
MapleParty party = getParty(partyid);
|
||||
Party party = getParty(partyid);
|
||||
if(party == null) return;
|
||||
|
||||
for(MaplePartyCharacter mpc : party.getMembers()) {
|
||||
@@ -1011,7 +1011,7 @@ public class World {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public void partyChat(MapleParty party, String chattext, String namefrom) {
|
||||
public void partyChat(Party party, String chattext, String namefrom) {
|
||||
for (MaplePartyCharacter partychar : party.getMembers()) {
|
||||
if (!(partychar.getName().equals(namefrom))) {
|
||||
Character chr = getPlayerStorage().getCharacterByName(partychar.getName());
|
||||
@@ -2006,7 +2006,7 @@ public class World {
|
||||
}
|
||||
|
||||
private void clearWorldData() {
|
||||
List<MapleParty> pList;
|
||||
List<Party> pList;
|
||||
partyLock.lock();
|
||||
try {
|
||||
pList = new ArrayList<>(parties.values());
|
||||
@@ -2014,7 +2014,7 @@ public class World {
|
||||
partyLock.unlock();
|
||||
}
|
||||
|
||||
for(MapleParty p : pList) {
|
||||
for(Party p : pList) {
|
||||
p.disposeLocks();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user