Rename and clean up MapleSummon
This commit is contained in:
@@ -25,7 +25,7 @@ import client.Client;
|
||||
import constants.skills.DarkKnight;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.maps.MapleSummon;
|
||||
import server.maps.Summon;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -38,10 +38,10 @@ public final class BeholderHandler extends AbstractPacketHandler {//Summon Skill
|
||||
@Override
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
//System.out.println(slea.toString());
|
||||
Collection<MapleSummon> summons = c.getPlayer().getSummonsValues();
|
||||
Collection<Summon> summons = c.getPlayer().getSummonsValues();
|
||||
int oid = p.readInt();
|
||||
MapleSummon summon = null;
|
||||
for (MapleSummon sum : summons) {
|
||||
Summon summon = null;
|
||||
for (Summon sum : summons) {
|
||||
if (sum.getObjectId() == oid) {
|
||||
summon = sum;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.Client;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapleSummon;
|
||||
import server.maps.Summon;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public final class DamageSummonHandler extends AbstractPacketHandler {
|
||||
@@ -41,8 +41,8 @@ public final class DamageSummonHandler extends AbstractPacketHandler {
|
||||
Character player = c.getPlayer();
|
||||
MapObject mmo = player.getMap().getMapObject(oid);
|
||||
|
||||
if(mmo != null && mmo instanceof MapleSummon) {
|
||||
MapleSummon summon = (MapleSummon) mmo;
|
||||
if(mmo != null && mmo instanceof Summon) {
|
||||
Summon summon = (Summon) mmo;
|
||||
|
||||
summon.addHP(-damage);
|
||||
if (summon.getHP() <= 0) {
|
||||
|
||||
@@ -24,7 +24,7 @@ package net.server.channel.handlers;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import net.packet.InPacket;
|
||||
import server.maps.MapleSummon;
|
||||
import server.maps.Summon;
|
||||
import tools.PacketCreator;
|
||||
import tools.exceptions.EmptyMovementException;
|
||||
|
||||
@@ -37,9 +37,9 @@ public final class MoveSummonHandler extends AbstractMovementPacketHandler {
|
||||
int oid = p.readInt();
|
||||
Point startPos = new Point(p.readShort(), p.readShort());
|
||||
Character player = c.getPlayer();
|
||||
Collection<MapleSummon> summons = player.getSummonsValues();
|
||||
MapleSummon summon = null;
|
||||
for (MapleSummon sum : summons) {
|
||||
Collection<Summon> summons = player.getSummonsValues();
|
||||
Summon summon = null;
|
||||
for (Summon sum : summons) {
|
||||
if (sum.getObjectId() == oid) {
|
||||
summon = sum;
|
||||
break;
|
||||
|
||||
@@ -36,7 +36,7 @@ import server.MapleItemInformationProvider;
|
||||
import server.MapleStatEffect;
|
||||
import server.life.Monster;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import server.maps.MapleSummon;
|
||||
import server.maps.Summon;
|
||||
import tools.FilePrinter;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -72,8 +72,8 @@ public final class SummonDamageHandler extends AbstractDealDamageHandler {
|
||||
if (!player.isAlive()) {
|
||||
return;
|
||||
}
|
||||
MapleSummon summon = null;
|
||||
for (MapleSummon sum : player.getSummonsValues()) {
|
||||
Summon summon = null;
|
||||
for (Summon sum : player.getSummonsValues()) {
|
||||
if (sum.getObjectId() == oid) {
|
||||
summon = sum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user