Rename and clean up MapleMist
This commit is contained in:
@@ -1029,7 +1029,7 @@ public class MapleStatEffect {
|
||||
}
|
||||
} else if (isMist()) {
|
||||
Rectangle bounds = calculateBoundingBox(sourceid == NightWalker.POISON_BOMB ? pos : applyfrom.getPosition(), applyfrom.isFacingLeft());
|
||||
MapleMist mist = new MapleMist(bounds, applyfrom, this);
|
||||
Mist mist = new Mist(bounds, applyfrom, this);
|
||||
applyfrom.getMap().spawnMist(mist, getDuration(), mist.isPoisonMist(), false, mist.isRecoveryMist());
|
||||
} else if (isTimeLeap()) {
|
||||
applyto.removeAllCooldownsExcept(Buccaneer.TIME_LEAP, true);
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.server.services.type.ChannelServices;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MapleMist;
|
||||
import server.maps.Mist;
|
||||
import tools.ArrayMap;
|
||||
import tools.Randomizer;
|
||||
|
||||
@@ -194,7 +194,7 @@ public class MobSkill {
|
||||
}
|
||||
break;
|
||||
case 131: // Mist
|
||||
monster.getMap().spawnMist(new MapleMist(calculateBoundingBox(monster.getPosition()), monster, this), x * 100, false, false, false);
|
||||
monster.getMap().spawnMist(new Mist(calculateBoundingBox(monster.getPosition()), monster, this), x * 100, false, false, false);
|
||||
break;
|
||||
case 132:
|
||||
disease = Disease.CONFUSE;
|
||||
|
||||
@@ -2069,7 +2069,7 @@ public class MapleMap {
|
||||
}, null);
|
||||
}
|
||||
|
||||
public void spawnMist(final MapleMist mist, final int duration, boolean poison, boolean fake, boolean recovery) {
|
||||
public void spawnMist(final Mist mist, final int duration, boolean poison, boolean fake, boolean recovery) {
|
||||
addMapObject(mist);
|
||||
broadcastMessage(fake ? mist.makeFakeSpawnData(30) : mist.makeSpawnData());
|
||||
TimerManager tMan = TimerManager.getInstance();
|
||||
|
||||
@@ -35,19 +35,20 @@ import tools.PacketCreator;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LaiLaiNoob
|
||||
*/
|
||||
public class MapleMist extends AbstractMapObject {
|
||||
private Rectangle mistPosition;
|
||||
public class Mist extends AbstractMapObject {
|
||||
private final Rectangle mistPosition;
|
||||
private Character owner = null;
|
||||
private Monster mob = null;
|
||||
private MapleStatEffect source;
|
||||
private MobSkill skill;
|
||||
private boolean isMobMist, isPoisonMist, isRecoveryMist;
|
||||
private int skillDelay;
|
||||
private final boolean isMobMist;
|
||||
private boolean isPoisonMist;
|
||||
private boolean isRecoveryMist;
|
||||
private final int skillDelay;
|
||||
|
||||
public MapleMist(Rectangle mistPosition, Monster mob, MobSkill skill) {
|
||||
public Mist(Rectangle mistPosition, Monster mob, MobSkill skill) {
|
||||
this.mistPosition = mistPosition;
|
||||
this.mob = mob;
|
||||
this.skill = skill;
|
||||
@@ -57,7 +58,7 @@ public class MapleMist extends AbstractMapObject {
|
||||
skillDelay = 0;
|
||||
}
|
||||
|
||||
public MapleMist(Rectangle mistPosition, Character owner, MapleStatEffect source) {
|
||||
public Mist(Rectangle mistPosition, Character owner, MapleStatEffect source) {
|
||||
this.mistPosition = mistPosition;
|
||||
this.owner = owner;
|
||||
this.source = source;
|
||||
@@ -69,11 +70,11 @@ public class MapleMist extends AbstractMapObject {
|
||||
case Evan.RECOVERY_AURA:
|
||||
isRecoveryMist = true;
|
||||
break;
|
||||
|
||||
|
||||
case Shadower.SMOKE_SCREEN: // Smoke Screen
|
||||
isPoisonMist = false;
|
||||
break;
|
||||
|
||||
|
||||
case FPMage.POISON_MIST: // FP mist
|
||||
case BlazeWizard.FLAME_GEAR: // Flame Gear
|
||||
case NightWalker.POISON_BOMB: // Poison Bomb
|
||||
@@ -105,9 +106,9 @@ public class MapleMist extends AbstractMapObject {
|
||||
}
|
||||
|
||||
public boolean isRecoveryMist() {
|
||||
return isRecoveryMist;
|
||||
return isRecoveryMist;
|
||||
}
|
||||
|
||||
|
||||
public int getSkillDelay() {
|
||||
return skillDelay;
|
||||
}
|
||||
Reference in New Issue
Block a user