Rename and clean up MaplePlayerNPC

This commit is contained in:
P0nk
2021-09-09 22:12:29 +02:00
parent 2ee4cd79f6
commit f8e7a525bd
22 changed files with 94 additions and 89 deletions

View File

@@ -50,7 +50,7 @@ import server.expeditions.ExpeditionType;
import server.gachapon.MapleGachapon;
import server.gachapon.MapleGachapon.MapleGachaponItem;
import server.life.LifeFactory;
import server.life.MaplePlayerNPC;
import server.life.PlayerNPC;
import server.maps.MapleMap;
import server.maps.MapleMapManager;
import server.maps.MapleMapObject;
@@ -311,12 +311,12 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
public boolean canSpawnPlayerNpc(int mapid) {
Character chr = getPlayer();
return !YamlConfig.config.server.PLAYERNPC_AUTODEPLOY && chr.getLevel() >= chr.getMaxClassLevel() && !chr.isGM() && MaplePlayerNPC.canSpawnPlayerNpc(chr.getName(), mapid);
return !YamlConfig.config.server.PLAYERNPC_AUTODEPLOY && chr.getLevel() >= chr.getMaxClassLevel() && !chr.isGM() && PlayerNPC.canSpawnPlayerNpc(chr.getName(), mapid);
}
public MaplePlayerNPC getPlayerNPCByScriptid(int scriptId) {
public PlayerNPC getPlayerNPCByScriptid(int scriptId) {
for(MapleMapObject pnpcObj : getPlayer().getMap().getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.PLAYER_NPC))) {
MaplePlayerNPC pn = (MaplePlayerNPC) pnpcObj;
PlayerNPC pn = (PlayerNPC) pnpcObj;
if(pn.getScriptId() == scriptId) {
return pn;