Remove "Maple" prefix from MaplePacketCreator name

This commit is contained in:
P0nk
2021-08-19 21:31:57 +02:00
parent 579e3c639f
commit e184f25184
307 changed files with 2285 additions and 2328 deletions

View File

@@ -43,7 +43,7 @@ import server.maps.*;
import server.partyquest.MapleCarnivalFactory;
import server.partyquest.MapleCarnivalFactory.MCSkill;
import tools.ArrayMap;
import tools.MaplePacketCreator;
import tools.PacketCreator;
import tools.Pair;
import java.awt.*;
@@ -826,8 +826,8 @@ public class MapleStatEffect {
if (absorbMp > 0) {
mob.setMp(mob.getMp() - absorbMp);
applyto.addMP(absorbMp);
applyto.announce(MaplePacketCreator.showOwnBuffEffect(sourceid, 1));
applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.showBuffeffect(applyto.getId(), sourceid, 1), false);
applyto.announce(PacketCreator.showOwnBuffEffect(sourceid, 1));
applyto.getMap().broadcastMessage(applyto, PacketCreator.showBuffeffect(applyto.getId(), sourceid, 1), false);
}
}
break;
@@ -875,7 +875,7 @@ public class MapleStatEffect {
if (primary) {
if (itemConNo != 0) {
if (!applyto.getAbstractPlayerInteraction().hasItem(itemCon, itemConNo)) {
applyto.announce(MaplePacketCreator.enableActions());
applyto.announce(PacketCreator.enableActions());
return false;
}
MapleInventoryManipulator.removeById(applyto.getClient(), ItemConstants.getInventoryType(itemCon), itemCon, itemConNo, false, true);
@@ -899,7 +899,7 @@ public class MapleStatEffect {
} */
if (!applyto.applyHpMpChange(hpCon, hpchange, mpchange)) {
applyto.announce(MaplePacketCreator.enableActions());
applyto.announce(PacketCreator.enableActions());
return false;
}
@@ -970,7 +970,7 @@ public class MapleStatEffect {
applyto.cancelBuffStats(MapleBuffStat.SUMMON);
}
applyto.announce(MaplePacketCreator.enableActions());
applyto.announce(PacketCreator.enableActions());
}
applyBuffEffect(applyfrom, applyto, primary);
@@ -1108,8 +1108,8 @@ public class MapleStatEffect {
affectedc += affectedp.size(); // used for heal
for (MapleCharacter affected : affectedp) {
applyTo(applyfrom, affected, false, null, useMaxRange, affectedc);
affected.announce(MaplePacketCreator.showOwnBuffEffect(sourceid, 2));
affected.getMap().broadcastMessage(affected, MaplePacketCreator.showBuffeffect(affected.getId(), sourceid, 2), false);
affected.announce(PacketCreator.showOwnBuffEffect(sourceid, 2));
affected.getMap().broadcastMessage(affected, PacketCreator.showBuffeffect(affected.getId(), sourceid, 2), false);
}
}
@@ -1182,7 +1182,7 @@ public class MapleStatEffect {
public final void applyComboBuff(final MapleCharacter applyto, int combo) {
final List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.ARAN_COMBO, combo));
applyto.announce(MaplePacketCreator.giveBuff(sourceid, 99999, stat));
applyto.announce(PacketCreator.giveBuff(sourceid, 99999, stat));
final long starttime = Server.getInstance().getCurrentTime();
// final CancelEffectAction cancelAction = new CancelEffectAction(applyto, this, starttime);
@@ -1192,7 +1192,7 @@ public class MapleStatEffect {
public final void applyBeaconBuff(final MapleCharacter applyto, int objectid) { // thanks Thora & Hyun for reporting an issue with homing beacon autoflagging mobs when changing maps
final List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.HOMING_BEACON, objectid));
applyto.announce(MaplePacketCreator.giveBuff(1, sourceid, stat));
applyto.announce(PacketCreator.giveBuff(1, sourceid, stat));
final long starttime = Server.getInstance().getCurrentTime();
applyto.registerEffect(this, starttime, Long.MAX_VALUE, false);
@@ -1205,9 +1205,9 @@ public class MapleStatEffect {
long leftDuration = (starttime + localDuration) - Server.getInstance().getCurrentTime();
if (leftDuration > 0) {
if (isDash() || isInfusion()) {
target.announce(MaplePacketCreator.givePirateBuff(activeStats, (skill ? sourceid : -sourceid), (int) leftDuration));
target.announce(PacketCreator.givePirateBuff(activeStats, (skill ? sourceid : -sourceid), (int) leftDuration));
} else {
target.announce(MaplePacketCreator.giveBuff((skill ? sourceid : -sourceid), (int) leftDuration, activeStats));
target.announce(PacketCreator.giveBuff((skill ? sourceid : -sourceid), (int) leftDuration, activeStats));
}
}
}
@@ -1260,35 +1260,35 @@ public class MapleStatEffect {
}
if (primary) {
localDuration = alchemistModifyVal(applyfrom, localDuration, false);
applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.showBuffeffect(applyto.getId(), sourceid, 1, (byte) 3), false);
applyto.getMap().broadcastMessage(applyto, PacketCreator.showBuffeffect(applyto.getId(), sourceid, 1, (byte) 3), false);
}
if (localstatups.size() > 0) {
byte[] buff = null;
byte[] mbuff = null;
if (this.isActive(applyto)) {
buff = MaplePacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, localstatups);
buff = PacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, localstatups);
}
if (isDash()) {
buff = MaplePacketCreator.givePirateBuff(statups, sourceid, seconds);
mbuff = MaplePacketCreator.giveForeignPirateBuff(applyto.getId(), sourceid, seconds, localstatups);
buff = PacketCreator.givePirateBuff(statups, sourceid, seconds);
mbuff = PacketCreator.giveForeignPirateBuff(applyto.getId(), sourceid, seconds, localstatups);
} else if (isWkCharge()) {
mbuff = MaplePacketCreator.giveForeignWKChargeEffect(applyto.getId(), sourceid, localstatups);
mbuff = PacketCreator.giveForeignWKChargeEffect(applyto.getId(), sourceid, localstatups);
} else if (isInfusion()) {
buff = MaplePacketCreator.givePirateBuff(localstatups, sourceid, seconds);
mbuff = MaplePacketCreator.giveForeignPirateBuff(applyto.getId(), sourceid, seconds, localstatups);
buff = PacketCreator.givePirateBuff(localstatups, sourceid, seconds);
mbuff = PacketCreator.giveForeignPirateBuff(applyto.getId(), sourceid, seconds, localstatups);
} else if (isDs()) {
List<Pair<MapleBuffStat, Integer>> dsstat = Collections.singletonList(new Pair<>(MapleBuffStat.DARKSIGHT, 0));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), dsstat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), dsstat);
} else if (isWw()) {
List<Pair<MapleBuffStat, Integer>> dsstat = Collections.singletonList(new Pair<>(MapleBuffStat.WIND_WALK, 0));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), dsstat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), dsstat);
} else if (isCombo()) {
Integer comboCount = applyto.getBuffedValue(MapleBuffStat.COMBO);
if (comboCount == null) comboCount = 0;
List<Pair<MapleBuffStat, Integer>> cbstat = Collections.singletonList(new Pair<>(MapleBuffStat.COMBO, comboCount));
buff = MaplePacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, cbstat);
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), cbstat);
buff = PacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, cbstat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), cbstat);
} else if (isMonsterRiding()) {
if (sourceid == Corsair.BATTLE_SHIP) {//hp
if (applyto.getBattleshipHp() <= 0) {
@@ -1297,23 +1297,23 @@ public class MapleStatEffect {
localstatups = statups;
}
buff = MaplePacketCreator.giveBuff(localsourceid, localDuration, localstatups);
mbuff = MaplePacketCreator.showMonsterRiding(applyto.getId(), givemount);
buff = PacketCreator.giveBuff(localsourceid, localDuration, localstatups);
mbuff = PacketCreator.showMonsterRiding(applyto.getId(), givemount);
localDuration = duration;
} else if (isShadowPartner()) {
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.SHADOWPARTNER, 0));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), stat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), stat);
} else if (isSoulArrow()) {
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.SOULARROW, 0));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), stat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), stat);
} else if (isEnrage()) {
applyto.handleOrbconsume();
} else if (isMorph()) {
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.MORPH, getMorph(applyto)));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), stat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), stat);
} else if (isAriantShield()) {
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.AURA, 1));
mbuff = MaplePacketCreator.giveForeignBuff(applyto.getId(), stat);
mbuff = PacketCreator.giveForeignBuff(applyto.getId(), stat);
}
if (buff != null) {