Rename MaplePortal

This commit is contained in:
P0nk
2021-09-09 22:36:45 +02:00
parent 667bc69eb1
commit 7f4760ba1a
19 changed files with 69 additions and 69 deletions

View File

@@ -802,7 +802,7 @@ public class Character extends AbstractCharacterObject {
c.setAccountName(this.client.getAccountName());//No null's for accountName
this.setClient(c);
this.map = c.getChannelServer().getMapFactory().getMap(getMapId());
MaplePortal portal = map.findClosestPlayerSpawnpoint(getPosition());
Portal portal = map.findClosestPlayerSpawnpoint(getPosition());
if (portal == null) {
portal = map.getPortal(0);
}
@@ -1292,7 +1292,7 @@ public class Character extends AbstractCharacterObject {
}
MapleMap map_ = getWarpMap(mapid);
MaplePortal portal_ = map_.getPortal(portal);
Portal portal_ = map_.getPortal(portal);
changeMap(map_, portal_ != null ? portal_ : map_.getRandomPlayerSpawnpoint());
setBanishPlayerData(banMap, banSp, banTime);
@@ -1337,7 +1337,7 @@ public class Character extends AbstractCharacterObject {
changeMap(warpMap, warpMap.getPortal(portal));
}
public void changeMap(int map, MaplePortal portal) {
public void changeMap(int map, Portal portal) {
MapleMap warpMap;
EventInstanceManager eim = getEventInstance();
@@ -1358,7 +1358,7 @@ public class Character extends AbstractCharacterObject {
changeMap(to, to.getPortal(portal));
}
public void changeMap(final MapleMap target, MaplePortal pto) {
public void changeMap(final MapleMap target, Portal pto) {
canWarpCounter++;
eventChangedMap(target.getId()); // player can be dropped from an event here, hence the new warping target.
@@ -1393,7 +1393,7 @@ public class Character extends AbstractCharacterObject {
eventAfterChangedMap(this.getMapId());
}
public void forceChangeMap(final MapleMap target, MaplePortal pto) {
public void forceChangeMap(final MapleMap target, Portal pto) {
// will actually enter the map given as parameter, regardless of being an eventmap or whatnot
canWarpCounter++;
@@ -7120,7 +7120,7 @@ public class Character extends AbstractCharacterObject {
if (ret.map == null) {
ret.map = mapManager.getMap(100000000);
}
MaplePortal portal = ret.map.getPortal(ret.initialSpawnPoint);
Portal portal = ret.map.getPortal(ret.initialSpawnPoint);
if (portal == null) {
portal = ret.map.getPortal(0);
ret.initialSpawnPoint = 0;
@@ -8145,7 +8145,7 @@ public class Character extends AbstractCharacterObject {
}
public void saveLocationOnWarp() { // suggestion to remember the map before warp command thanks to Lei
MaplePortal closest = map.findClosestPortal(getPosition());
Portal closest = map.findClosestPortal(getPosition());
int curMapid = getMapId();
for (int i = 0; i < savedLocations.length; i++) {
@@ -8156,7 +8156,7 @@ public class Character extends AbstractCharacterObject {
}
public void saveLocation(String type) {
MaplePortal closest = map.findClosestPortal(getPosition());
Portal closest = map.findClosestPortal(getPosition());
savedLocations[SavedLocationType.fromString(type).ordinal()] = new SavedLocation(getMapId(), closest != null ? closest.getId() : 0);
}
@@ -8412,7 +8412,7 @@ public class Character extends AbstractCharacterObject {
if (map == null || map.getId() == 610020000 || map.getId() == 610020001) { // reset to first spawnpoint on those maps
ps.setInt(24, 0);
} else {
MaplePortal closest = map.findClosestPlayerSpawnpoint(getPosition());
Portal closest = map.findClosestPlayerSpawnpoint(getPosition());
if (closest != null) {
ps.setInt(24, closest.getId());
} else {

View File

@@ -108,7 +108,7 @@ public class GotoCommand extends Command {
MapleMap target = c.getChannelServer().getMapFactory().getMap(gotomaps.get(params[0]));
// expedition issue with this command detected thanks to Masterrulax
MaplePortal targetPortal = target.getRandomPlayerSpawnpoint();
Portal targetPortal = target.getRandomPlayerSpawnpoint();
player.saveLocationOnWarp();
player.changeMap(target, targetPortal);
} else {

View File

@@ -27,7 +27,7 @@ import client.Character;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
import server.maps.MaplePortal;
import server.maps.Portal;
public class JailCommand extends Command {
{
@@ -59,7 +59,7 @@ public class JailCommand extends Command {
if (victim.getMapId() != mapid) { // those gone to jail won't be changing map anyway
MapleMap target = c.getChannelServer().getMapFactory().getMap(mapid);
MaplePortal targetPortal = target.getPortal(0);
Portal targetPortal = target.getPortal(0);
victim.saveLocationOnWarp();
victim.changeMap(target, targetPortal);
player.message(victim.getName() + " was jailed for " + minutesJailed + " minutes.");

View File

@@ -32,8 +32,8 @@ import server.life.Monster;
import server.life.SpawnPoint;
import server.maps.MapObject;
import server.maps.MapObjectType;
import server.maps.MaplePortal;
import server.maps.MapleReactor;
import server.maps.Portal;
import java.awt.*;
import java.util.Arrays;
@@ -80,7 +80,7 @@ public class DebugCommand extends Command {
break;
case "portal":
MaplePortal portal = player.getMap().findClosestPortal(player.getPosition());
Portal portal = player.getMap().findClosestPortal(player.getPosition());
if (portal != null)
player.dropMessage(6, "Closest portal: " + portal.getId() + " '" + portal.getName() + "' Type: " + portal.getType() + " --> toMap: " + portal.getTargetMapId() + " scriptname: '" + portal.getScriptName() + "' state: " + (portal.getPortalState() ? 1 : 0) + ".");
else player.dropMessage(6, "There is no portal on this map.");