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